File tree Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 2525 " Titus Wormer <[email protected] > (https://wooorm.com)" 2626 ],
2727 "files" : [
28- " index.js"
28+ " index.js" ,
29+ " types/index.d.ts"
2930 ],
30- "dependencies " : {} ,
31+ "types " : " types/index.d.ts " ,
3132 "devDependencies" : {
3233 "browserify" : " ^17.0.0" ,
34+ "dtslint" : " ^4.0.0" ,
3335 "nyc" : " ^15.0.0" ,
3436 "prettier" : " ^2.0.0" ,
3537 "remark-cli" : " ^9.0.0" ,
4547 "build" : " npm run build-bundle && npm run build-mangle" ,
4648 "test-api" : " node test" ,
4749 "test-coverage" : " nyc --reporter lcov tape test.js" ,
48- "test" : " npm run format && npm run build && npm run test-coverage"
50+ "test-types" : " dtslint types" ,
51+ "test" : " npm run format && npm run build && npm run test-coverage && npm run test-types"
4952 },
5053 "prettier" : {
5154 "tabWidth" : 2 ,
5962 "prettier" : true ,
6063 "esnext" : false ,
6164 "ignore" : [
62- " mdast-util-to-string.js"
65+ " mdast-util-to-string.js" ,
66+ " types/test.ts"
6367 ]
6468 },
6569 "nyc" : {
Original file line number Diff line number Diff line change 1+ // Minimum TypeScript Version: 3.0
2+ import { Node } from 'unist'
3+
4+ declare namespace mdastToString { }
5+
6+ declare function mdastToString ( node : Node | Node [ ] ) : string
7+
8+ export = mdastToString
Original file line number Diff line number Diff line change 1+ import * as mdastUtilToString from 'mdast-util-to-string'
2+
3+ mdastUtilToString ( ) // $ExpectError
4+ mdastUtilToString ( { type : 'root' } ) // $ExpectType string
5+ mdastUtilToString ( [ { type : 'root' } ] ) // $ExpectType string
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "moduleResolution" : " node" ,
4+ "lib" : [
5+ " ES5"
6+ ],
7+ "strict" : true ,
8+ "baseUrl" : " ." ,
9+ "paths" : {
10+ "mdast-util-to-string" : [
11+ " ./index.d.ts"
12+ ]
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " dtslint/dtslint.json" ,
3+ "rules" : {
4+ "semicolon" : false ,
5+ "whitespace" : false
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments