add getNodeByType utility function and introduce type test
... | ... | @@ -3,14 +3,16 @@ |
"version": "0.11.0", | ||
"description": "An MFM parser implementation with PEG.js", | ||
"main": "./built/index.js", | ||
"types": "./built/index.d.ts", | ||
"scripts": { | ||
"build": "npm run tsc && npm run peg", | ||
"build-debug": "npm run tsc && npm run peg-debug", | ||
"peg": "pegjs -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/parser.pegjs", | ||
"peg-debug": "pegjs -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/parser.pegjs", | ||
"tsc": "tsc", | ||
"tsd": "tsd", | ||
"parse": "node ./built/cli/parse", | ||
"test": "mocha -r ts-node/register 'test/**/*.ts'" | ||
"test": "mocha -r ts-node/register 'test/**/*.ts' && npm run tsd" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
... | ... | @@ -25,6 +27,7 @@ |
"mocha": "8.3.x", | ||
"pegjs": "0.10.x", | ||
"ts-node": "9.1.x", | ||
"tsd": "^0.14.0", | ||
"typescript": "4.2.x" | ||
}, | ||
"dependencies": { | ||
... | ... |
test-d/index.ts
0 → 100644
Please register or sign in to comment