Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import * as acorn from 'acorn';

declare class TokContext {
constructor(
token: string,
isExpr: boolean,
preserveSpace: boolean,
override?: (parser: any) => void
)
}

interface JsxTokTypes extends AcornTokTypes {
jsxName: acorn.TokenType,
jsxText: acorn.TokenType,
Expand All @@ -24,9 +33,9 @@ declare namespace jsx {
}

interface TokContexts {
tc_oTag: acorn.TokContext,
tc_cTag: acorn.TokContext,
tc_expr: acorn.TokContext
tc_oTag: TokContext,
tc_cTag: TokContext,
tc_expr: TokContext
}

// We pick (statics) from acorn rather than plain extending to avoid complaint
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
},
"license": "MIT",
"scripts": {
"attw": "attw --pack",
"test": "node test/run.js"
},
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"devDependencies": {
"acorn": "^8.0.1"
"@arethetypeswrong/cli": "^0.18.2",
"acorn": "^8.15.0"
}
}