feat(dedent): add typings for dedent

This commit is contained in:
Douglas Duteil 2017-06-29 16:40:40 +02:00 committed by GitHub
parent 09c31b3084
commit 095c701760
4 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import dedent from 'dedent';
const lines: string = dedent`
first
second
third
`;
const text: string = dedent(`
A test argument.
`);

7
types/dedent/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
// Type definitions for dedent v0.7.0
// Project: https://github.com/dmnd/dedent
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export default function dedent(literals: string): string;
export default function dedent(literals: TemplateStringsArray, ...placeholders: any[]): string;

View File

@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"dedent-tests.ts"
]
}

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

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