mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46404 new package: validate-npm-package-name by @carboneater
* feat: new package: validate-npm-package-name * fix: Fix Project Repo URL Co-authored-by: Gabriel Fournier <gfournier@focusoptimization.com>
This commit is contained in:
parent
3851d98583
commit
67d24513cc
19
types/validate-npm-package-license/index.d.ts
vendored
Normal file
19
types/validate-npm-package-license/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for validate-npm-package-license 3.0
|
||||
// Project: https://github.com/kemitchell/validate-npm-package-license.js#readme
|
||||
// Definitions by: Gabriel Fournier <https://github.com/carboneater>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace validateLicense {
|
||||
interface Result {
|
||||
inFile?: string;
|
||||
spdx?: true;
|
||||
unlicensed?: true;
|
||||
validForOldPackages: boolean;
|
||||
validForNewPackages: boolean;
|
||||
warnings?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
declare function validateLicense(license: string): validateLicense.Result;
|
||||
|
||||
export = validateLicense;
|
||||
23
types/validate-npm-package-license/tsconfig.json
Normal file
23
types/validate-npm-package-license/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"validate-npm-package-license-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/validate-npm-package-license/tslint.json
Normal file
1
types/validate-npm-package-license/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -0,0 +1,9 @@
|
||||
import validateLicense = require('validate-npm-package-license');
|
||||
|
||||
validateLicense('MIT'); // $ExpectType Result
|
||||
validateLicense('BSD-2-Clause'); // $ExpectType Result
|
||||
validateLicense('Apache-2.0'); // $ExpectType Result
|
||||
validateLicense('ISC'); // $ExpectType Result
|
||||
validateLicense('UNLICENSED'); // $ExpectType Result
|
||||
validateLicense('(GPL-3.0-only OR BSD-2-Clause)'); // $ExpectType Result
|
||||
validateLicense('LicenseRef-Made-Up'); // $ExpectType Result
|
||||
Loading…
Reference in New Issue
Block a user