BugDomain: ES ModulesHelp Wanted
倉庫指標
- Star
- (48,455 star)
- PR 合併指標
- (平均合併 6天 17小時) (30 天內合併 9 個 PR)
描述
🔎 Search Terms
importtype, import type parsing
🕗 Version & Regression Information
- This changed between versions 4.6.4 and 4.7.4 (with the old
assertkeyword)
⏯ Playground Link
💻 Code
declare module "wat";
type _ = typeof import("wat", {
assert: {
a: (() => {
console.log("why can you write js here????");
})(),
}
});
🙁 Actual behavior
parser accepts arbitrary JS expressions inside a type expression
🙂 Expected behavior
parser only allows string literal values or arbitrary type values
Additional information about the issue
No response