diff --git a/types/newline-remove/index.d.ts b/types/newline-remove/index.d.ts new file mode 100644 index 0000000000..23bb087225 --- /dev/null +++ b/types/newline-remove/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for newline-remove 1.0 +// Project: https://github.com/yoshuawuyts/newline-remove +// Definitions by: OpenByteDev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Strip all newlines from the given value + */ +declare function removeNewlines(val: string): string; + +export = removeNewlines; diff --git a/types/newline-remove/newline-remove-tests.ts b/types/newline-remove/newline-remove-tests.ts new file mode 100644 index 0000000000..343f3e1879 --- /dev/null +++ b/types/newline-remove/newline-remove-tests.ts @@ -0,0 +1,4 @@ +import removeNewline = require('newline-remove'); + +removeNewline('foo\n bar\n'); +// => 'foo bar' diff --git a/types/newline-remove/tsconfig.json b/types/newline-remove/tsconfig.json new file mode 100644 index 0000000000..f0059d329e --- /dev/null +++ b/types/newline-remove/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "newline-remove-tests.ts" + ] +} \ No newline at end of file diff --git a/types/newline-remove/tslint.json b/types/newline-remove/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/newline-remove/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}