diff --git a/types/dashify/dashify-tests.ts b/types/dashify/dashify-tests.ts new file mode 100644 index 0000000000..3ff76d8628 --- /dev/null +++ b/types/dashify/dashify-tests.ts @@ -0,0 +1,7 @@ +import dashify = require('dashify'); + +const output: string = dashify('Foo----Bar'); +// => 'foo----bar' + +const output2: string = dashify('Foo----Bar', {condense: true}); +// => 'foo-bar' diff --git a/types/dashify/index.d.ts b/types/dashify/index.d.ts new file mode 100644 index 0000000000..54894f9e59 --- /dev/null +++ b/types/dashify/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for dashify 1.0 +// Project: https://github.com/jonschlinkert/dashify +// Definitions by: Junyoung Choi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function dashify(input: string, options?: dashify.Options): string; + +declare namespace dashify { + interface Options { + condense?: boolean; + } +} + +export = dashify; diff --git a/types/dashify/tsconfig.json b/types/dashify/tsconfig.json new file mode 100644 index 0000000000..81e84c030c --- /dev/null +++ b/types/dashify/tsconfig.json @@ -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", + "dashify-tests.ts" + ] +} \ No newline at end of file diff --git a/types/dashify/tslint.json b/types/dashify/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/dashify/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}