-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow imports of JSON #1065
Allow imports of JSON #1065
Conversation
@ry this is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few comments-
@ry ready for review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
assertEqual(deps && deps.length, 0); | ||
assert(factory != null); | ||
const factoryResult = factory(); | ||
assertEqual(factoryResult, { hello: "world", foo: "bar" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks.
Slowdowns cold-boot benchmark: 0.5s -> 0.8s This reverts commit 2422e52.
- Performance and stability improvements on all platforms. - Add repl (denoland#998) - Add deno.Buffer (denoland#1121) - Support cargo check (denoland#1128) - Upgrade Rust crates and Flatbuffers. (denoland#1145, denoland#1127) - Add helper to turn deno.Reader into async iterator (denoland#1130) - Add ability to load JSON as modules (denoland#1065) - Add deno.resources() (denoland#1119) - Add application/x-typescript mime type support (denoland#1111)
- Performance and stability improvements on all platforms. - Add repl (#998) - Add deno.Buffer (#1121) - Support cargo check (#1128) - Upgrade Rust crates and Flatbuffers. (#1145, #1127) - Add helper to turn deno.Reader into async iterator (#1130) - Add ability to load JSON as modules (#1065) - Add deno.resources() (#1119) - Add application/x-typescript mime type support (#1111)
This output :
Would it be possible to support it in the future? |
Fixes #1048
This is a WIP PR for allowing the import of JSON as a module, which would include the ability to ensure its type safety in consuming code. This would allow:
config.json
main.ts