mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Merge pull request #26731 from claasahl/master
new package: "starwars-names"
This commit is contained in:
9
types/starwars-names/index.d.ts
vendored
Normal file
9
types/starwars-names/index.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for starwars-names 1.6
|
||||
// Project: https://github.com/kentcdodds/starwars-names#readme
|
||||
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace starwarsNames;
|
||||
export const all: string[];
|
||||
export function random(): string;
|
||||
export function random(number: number): string[];
|
||||
5
types/starwars-names/starwars-names-tests.ts
Normal file
5
types/starwars-names/starwars-names-tests.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import * as names from "starwars-names";
|
||||
|
||||
const allNames = names.all;
|
||||
const randomName = names.random();
|
||||
const threeRandomNames = names.random(3);
|
||||
23
types/starwars-names/tsconfig.json
Normal file
23
types/starwars-names/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"starwars-names-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/starwars-names/tslint.json
Normal file
1
types/starwars-names/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user