Added declarations for 'newline-remove'

This commit is contained in:
Openbyte
2018-02-16 01:05:31 +01:00
parent 480cab7dcb
commit eac9f9e343
4 changed files with 42 additions and 0 deletions

11
types/newline-remove/index.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// Type definitions for newline-remove 1.0
// Project: https://github.com/yoshuawuyts/newline-remove
// Definitions by: OpenByteDev <https://github.com/OpenByteDev>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Strip all newlines from the given value
*/
declare function removeNewlines(val: string): string;
export = removeNewlines;

View File

@@ -0,0 +1,4 @@
import removeNewline = require('newline-remove');
removeNewline('foo\n bar\n');
// => 'foo bar'

View File

@@ -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"
]
}

View File

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