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
npm:
Version: Deno 1.44.1
I want to use parse() of @babel/parser
parse()
@babel/parser
https://babeljs.io/docs/babel-parser#babelparserparsecode-options
import { parse } from "npm:@babel/parser"; const ast = parse("const foo = {};"); console.log(ast);
Referring to the type definition of parse(). The reason is that this @babel/types cannot be resolved.
@babel/types
import * as _babel_types from '@babel/types'; // ... declare function parse( input: string, options?: ParserOptions ): ParseResult<_babel_types.File>;
You can use import map to replace @babel with npm:@babel so that you can trace it.
@babel
npm:@babel
{ "imports": { "@babel": "npm:@babel" } }
However, in my actual application, I use Worker, so this workaround doesn't work, because import map doesn't work.
Worker
The text was updated successfully, but these errors were encountered:
I tested with arktype, and got the same result
import { type } from "npm:arktype"; const user = type({ name: "string", });
Sorry, something went wrong.
This is an issue with Babel:
No branches or pull requests
Version: Deno 1.44.1
Summary
I want to use
parse()
of@babel/parser
https://babeljs.io/docs/babel-parser#babelparserparsecode-options
Cause
Referring to the type definition of
parse()
. The reason is that this@babel/types
cannot be resolved.Workaround
You can use import map to replace
@babel
withnpm:@babel
so that you can trace it.However, in my actual application, I use
Worker
, so this workaround doesn't work, because import map doesn't work.The text was updated successfully, but these errors were encountered: