We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d612c9e commit cf2d90cCopy full SHA for cf2d90c
packages/typescript/nursery.js
@@ -1,4 +1,5 @@
1
const { setup } = require('@ast-grep/nursery')
2
+const assert = require('node:assert')
3
const languageRegistration = require('./index')
4
const path = require('node:path')
5
@@ -9,6 +10,9 @@ setup({
9
10
src: path.join('typescript', 'src'),
11
languageRegistration,
12
testRunner: parse => {
- // add test here
13
+ const sg = parse('let x: number = 123')
14
+ const root = sg.root()
15
+ const node = root.find('let $VAR: number = $VALUE')
16
+ assert.equal(node.kind(), 'lexical_declaration')
17
},
18
})
0 commit comments