File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 "c8" : " ^11.0.0" ,
5454 "eslint" : " ^9.17.0" ,
5555 "neostandard" : " ^0.13.0" ,
56- "tsd " : " ^0.33 .0"
56+ "tstyche " : " ^7.0 .0"
5757 },
5858 "types" : " types/index.d.ts" ,
5959 "files" : [
6969 "lint:fix" : " eslint --fix" ,
7070 "test" : " npm run test:unit && npm run test:typescript" ,
7171 "test:unit" : " c8 --100 node --test" ,
72- "test:typescript" : " tsd "
72+ "test:typescript" : " tstyche "
7373 }
74- }
74+ }
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ /// <reference types="node" />
2+
3+ import { type IncomingMessage } from 'node:http'
4+ import { expect } from 'tstyche'
5+ import forwardedESM , { forwarded } from '.'
6+ import * as forwardedVarImport from '.'
7+
8+ expect ( forwardedESM ( { } as IncomingMessage ) ) . type . toBe < string [ ] > ( )
9+ expect ( forwarded ( { } as IncomingMessage ) ) . type . toBe < string [ ] > ( )
10+
11+ expect ( forwardedVarImport . default ( { } as IncomingMessage ) ) . type . toBe < string [ ] > ( )
12+ expect ( forwardedVarImport . forwarded ( { } as IncomingMessage ) ) . type . toBe <
13+ string [ ]
14+ > ( )
15+
16+ expect ( forwarded ) . type . not . toBeCallableWith ( )
17+ expect ( forwarded ) . type . not . toBeCallableWith ( '10.0.0.1' )
You can’t perform that action at this time.
0 commit comments