File tree Expand file tree Collapse file tree 5 files changed +91
-0
lines changed
Expand file tree Collapse file tree 5 files changed +91
-0
lines changed Original file line number Diff line number Diff line change 1+ *
2+ ! ** /* .d.ts
3+ ! ** /* .d.cts
4+ ! ** /* .d.mts
5+ ! ** /* .d. * .ts
Original file line number Diff line number Diff line change 1+ import CertStreamClient from "certstream" ;
2+
3+ // $ExpectType typeof CertStreamClient
4+ CertStreamClient ;
5+
6+ new CertStreamClient (
7+ ( message , context ) => {
8+ // $ExpectType any
9+ message ;
10+ // $ExpectType any
11+ context ;
12+ } ,
13+ ) ;
14+
15+ new CertStreamClient (
16+ ( message , context ) => {
17+ // $ExpectType any
18+ message ;
19+ // $ExpectType any
20+ context ;
21+ } ,
22+ true ,
23+ ) ;
24+
25+ declare let client : CertStreamClient ;
26+
27+ // $ExpectType Callback
28+ client . callback ;
29+ // $ExpectType any
30+ client . context ;
31+ // $ExpectType boolean
32+ client . skipHeartbeats ;
33+ // $ExpectType void
34+ client . connect ( ) ;
Original file line number Diff line number Diff line change 1+ declare namespace CertStreamClient {
2+ type Callback = ( message : any , context : any ) => void ;
3+ }
4+
5+ declare class CertStreamClient {
6+ context : any ;
7+ callback : CertStreamClient . Callback ;
8+ skipHeartbeats : boolean ;
9+
10+ constructor ( callback : CertStreamClient . Callback , skipHeartbeats ?: boolean ) ;
11+
12+ connect ( url ?: string ) : void ;
13+ }
14+
15+ export = CertStreamClient ;
16+ export as namespace CertStreamClient ;
Original file line number Diff line number Diff line change 1+ {
2+ "private" : true ,
3+ "name" : " @types/certstream" ,
4+ "version" : " 1.1.9999" ,
5+ "projects" : [
6+ " https://github.com/CaliDog/certstream-js#readme"
7+ ],
8+ "devDependencies" : {
9+ "@types/certstream" : " workspace:."
10+ },
11+ "owners" : [
12+ {
13+ "name" : " Jimmy Leung" ,
14+ "githubUsername" : " hkleungai"
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "module" : " node16" ,
4+ "lib" : [
5+ " es6"
6+ ],
7+ "noImplicitAny" : true ,
8+ "noImplicitThis" : true ,
9+ "strictFunctionTypes" : true ,
10+ "strictNullChecks" : true ,
11+ "types" : [],
12+ "noEmit" : true ,
13+ "forceConsistentCasingInFileNames" : true
14+ },
15+ "files" : [
16+ " index.d.ts" ,
17+ " certstream-tests.ts"
18+ ]
19+ }
You can’t perform that action at this time.
0 commit comments