We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import file from "./file.json" with {type: "json"}
CoffeeScript supports import assertions:
import file from "./file.json" assert {type: "json"}
But the spec was replaced by import attributes (i.e. the assert keyword has been rewritten as with):
assert
with
The new spec is currently at stage 3, and recently marked as stable in Node.js. https://nodejs.org/api/esm.html#import-attributes
It would be cool if CoffeeScript supported the new syntax. The alternative is pretty cumbersome:
import {readFileSync} from "node:fs" import {join} from "node:path" file = JSON.parse readFileSync join(import.meta.dirname, "./file.json"), "utf8"
No error when using import attributes.
[...]\src\cli.coffee:4:35: error: reserved word 'with' import pkg from "../package.json" with {type: "json"}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
CoffeeScript supports import assertions:
But the spec was replaced by import attributes (i.e. the
assert
keyword has been rewritten aswith
):The new spec is currently at stage 3, and recently marked as stable in Node.js.
https://nodejs.org/api/esm.html#import-attributes
It would be cool if CoffeeScript supported the new syntax.
The alternative is pretty cumbersome:
Expected Behavior
No error when using import attributes.
Current Behavior
Environment
The text was updated successfully, but these errors were encountered: