Files
bun.sh/src/bun.js/modules/ObjectModule.h
Jarred Sumner 51d3d43822 Support named imports for json & toml files at runtime (#4783)
* Support named exports in json imports

* Support named imports for `*.json` files

* Remove stale comments

* Don't export arrays as non-default

* Add test for default exports

* Don't break webpack

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-10 23:15:35 -07:00

19 lines
677 B
C++

#pragma once
#include "../bindings/ZigGlobalObject.h"
#include "JavaScriptCore/JSGlobalObject.h"
namespace Zig {
JSC::SyntheticSourceProvider::SyntheticSourceGenerator
generateObjectModuleSourceCode(JSC::JSGlobalObject *globalObject,
JSC::JSObject *object);
JSC::SyntheticSourceProvider::SyntheticSourceGenerator
generateObjectModuleSourceCodeForJSON(JSC::JSGlobalObject *globalObject,
JSC::JSObject *object);
JSC::SyntheticSourceProvider::SyntheticSourceGenerator
generateJSValueModuleSourceCode(JSC::JSGlobalObject *globalObject,
JSC::JSValue value);
} // namespace Zig