Add types for pupa@1.0.0

This commit is contained in:
nju33
2017-12-13 17:21:05 +09:00
parent 57d67975c7
commit 4add6500cd
4 changed files with 36 additions and 0 deletions

8
types/pupa/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for pupa 1.0
// Project: https://github.com/sindresorhus/pupa
// Definitions by: nju33 <https://github.com/nju33>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function pupa(tpl: string, data: any[] | {[key: string]: any}): string | never;
export = pupa;

4
types/pupa/pupa-tests.ts Normal file
View File

@@ -0,0 +1,4 @@
import pupa = require('pupa');
pupa('{str}ing', {str: 'str'});
pupa('{0}{1}', ['str', 'ing']);

23
types/pupa/tsconfig.json Normal file
View 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",
"pupa-tests.ts"
]
}

1
types/pupa/tslint.json Normal file
View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }