File tree Expand file tree Collapse file tree
types/correct-license-metadata Expand file tree Collapse file tree 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 correctLicenseMetadata = require( "correct-license-metadata" ) ;
2+
3+ // $ExpectType string | false
4+ correctLicenseMetadata ( { license : "MIT" } ) ;
5+
6+ // $ExpectType string | false
7+ correctLicenseMetadata ( { licenses : [ { type : "MIT" } ] } ) ;
8+
9+ // $ExpectType string | false
10+ correctLicenseMetadata ( { license : "Apache 2" } ) ;
11+
12+ // $ExpectType string | false
13+ correctLicenseMetadata ( { licenses : [ "MIT" ] } ) ;
14+
15+ // @ts -expect-error
16+ correctLicenseMetadata ( "MIT" ) ;
Original file line number Diff line number Diff line change 1+ declare function correctLicenseMetadata ( metadata : correctLicenseMetadata . PackageMetadata ) : string | false ;
2+
3+ declare namespace correctLicenseMetadata {
4+ interface PackageMetadata {
5+ license ?: string | { type ?: string ; license ?: string } | undefined ;
6+ licenses ?:
7+ | Array < string | { type ?: string ; license ?: string } >
8+ | string
9+ | { type ?: string ; license ?: string }
10+ | undefined ;
11+ }
12+ }
13+
14+ export = correctLicenseMetadata ;
Original file line number Diff line number Diff line change 1+ {
2+ "private" : true ,
3+ "name" : " @types/correct-license-metadata" ,
4+ "version" : " 1.5.9999" ,
5+ "projects" : [
6+ " https://github.com/jslicense/correct-license-metadata.js"
7+ ],
8+ "devDependencies" : {
9+ "@types/correct-license-metadata" : " workspace:."
10+ },
11+ "owners" : [
12+ {
13+ "name" : " Jamie Magee" ,
14+ "githubUsername" : " JamieMagee"
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+ "strictNullChecks" : true ,
10+ "strictFunctionTypes" : true ,
11+ "types" : [],
12+ "noEmit" : true ,
13+ "forceConsistentCasingInFileNames" : true
14+ },
15+ "files" : [
16+ " index.d.ts" ,
17+ " correct-license-metadata-tests.ts"
18+ ]
19+ }
You can’t perform that action at this time.
0 commit comments