Usage: npm it
Last active
December 2, 2024 21:52
-
-
Save nolanlawson/4d0ae1bcedcbb9d23cca8c3b2cc21d31 to your computer and use it in GitHub Desktop.
ESTree Toolkit types issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parseScript } from 'meriyah' | |
import { traverse } from 'estree-toolkit' | |
const ast = parseScript('console.log("hello world")') | |
traverse(ast, { | |
'MemberExpression|CallExpression': () => { | |
console.log('traversed!') | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test-estree-toolkit", | |
"version": "1.0.0", | |
"lockfileVersion": 3, | |
"requires": true, | |
"packages": { | |
"": { | |
"name": "test-estree-toolkit", | |
"version": "1.0.0", | |
"license": "ISC", | |
"dependencies": { | |
"estree-toolkit": "^1.7.8", | |
"meriyah": "^6.0.3", | |
"typescript": "^5.7.2" | |
} | |
}, | |
"node_modules/@types/estree": { | |
"version": "1.0.6", | |
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", | |
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" | |
}, | |
"node_modules/@types/estree-jsx": { | |
"version": "1.0.5", | |
"resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", | |
"integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", | |
"dependencies": { | |
"@types/estree": "*" | |
} | |
}, | |
"node_modules/estree-toolkit": { | |
"version": "1.7.8", | |
"resolved": "https://registry.npmjs.org/estree-toolkit/-/estree-toolkit-1.7.8.tgz", | |
"integrity": "sha512-v0Q0L+0agSDFe3x9Sj7aAzrI9afvsfr5r7AM2SNk/8bKYRQ3tUf4PQEUWe99LkWysmT1PsuSpW+W1w/xZmCKeg==", | |
"dependencies": { | |
"@types/estree": "^1.0.5", | |
"@types/estree-jsx": "^1.0.5" | |
} | |
}, | |
"node_modules/meriyah": { | |
"version": "6.0.3", | |
"resolved": "https://registry.npmjs.org/meriyah/-/meriyah-6.0.3.tgz", | |
"integrity": "sha512-NqUbuQIjIH8dxUBPTMHS1kwIHd6n6nF3F7oeLXGWqBkpVP2lZxVHdab5JxbFBisIB4axZ9b/lT4HLJfZxmFK7Q==", | |
"engines": { | |
"node": ">=18.0.0" | |
} | |
}, | |
"node_modules/typescript": { | |
"version": "5.7.2", | |
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", | |
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", | |
"bin": { | |
"tsc": "bin/tsc", | |
"tsserver": "bin/tsserver" | |
}, | |
"engines": { | |
"node": ">=14.17" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test-estree-toolkit", | |
"version": "1.0.0", | |
"type": "module", | |
"main": "index.js", | |
"scripts": { | |
"test": "tsc index.ts" | |
}, | |
"dependencies": { | |
"estree-toolkit": "^1.7.8", | |
"meriyah": "^6.0.3", | |
"typescript": "^5.7.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment