File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ declare namespace jsonp {
2+ interface Options {
3+ /** length limit for callback function name, default to `512` */
4+ limit ?: number ;
5+ /** replacer in `JSON.stringify(obj, [replacer, [space]])` */
6+ replacer ?: Parameters < typeof JSON . stringify > [ 1 ] ;
7+ /** space in `JSON.stringify(obj, [replacer, [space]])` */
8+ space ?: Parameters < typeof JSON . stringify > [ 2 ] ;
9+ }
10+ }
11+
12+ declare function jsonp (
13+ obj : any ,
14+ callback ?: string | string [ ] ,
15+ options ?: jsonp . Options
16+ ) : string ;
17+
18+ export = jsonp ;
Original file line number Diff line number Diff line change 33 "version" : " 1.0.0" ,
44 "description" : " Helper to create more safe jsonp response body for koa and other web framework." ,
55 "main" : " index.js" ,
6+ "types" : " index.d.ts" ,
67 "scripts" : {
78 "test" : " mocha test/*.test.js" ,
89 "test-cov" : " istanbul cover _mocha -- test/*.test.js"
You can’t perform that action at this time.
0 commit comments