Skip to content

Commit aa1a634

Browse files
authored
🤖 Merge PR DefinitelyTyped#74844 [npm-license-corrections] Add type definitions for npm-license-corrections by @JamieMagee
1 parent 1e54343 commit aa1a634

5 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!**/*.d.ts
3+
!**/*.d.cts
4+
!**/*.d.mts
5+
!**/*.d.*.ts
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
interface NpmLicenseCorrection {
2+
name: string;
3+
version: string;
4+
license: string;
5+
}
6+
7+
declare const npmLicenseCorrections: NpmLicenseCorrection[];
8+
export = npmLicenseCorrections;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import npmLicenseCorrections = require("npm-license-corrections");
2+
3+
// $ExpectType NpmLicenseCorrection[]
4+
npmLicenseCorrections;
5+
6+
const correction = npmLicenseCorrections[0];
7+
8+
// $ExpectType string
9+
correction.name;
10+
11+
// $ExpectType string
12+
correction.version;
13+
14+
// $ExpectType string
15+
correction.license;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"private": true,
3+
"name": "@types/npm-license-corrections",
4+
"version": "1.9.9999",
5+
"projects": [
6+
"https://github.com/jslicense/npm-license-corrections.json"
7+
],
8+
"devDependencies": {
9+
"@types/npm-license-corrections": "workspace:."
10+
},
11+
"owners": [
12+
{
13+
"name": "Jamie Magee",
14+
"githubUsername": "JamieMagee"
15+
}
16+
]
17+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
"npm-license-corrections-tests.ts"
18+
]
19+
}

0 commit comments

Comments
 (0)