-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Typescript type definitions (#5)
- Loading branch information
1 parent
ab8db41
commit 874367e
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
declare module eol { | ||
/** | ||
* Normalize line endings in text for the current operating system | ||
* @return string with line endings normalized to \r\n or \n | ||
*/ | ||
export function auto(text: string): string; | ||
|
||
/** | ||
* Normalize line endings in text to CRLF (Windows, DOS) | ||
* @return string with line endings normalized to \r\n | ||
*/ | ||
export function crlf(text: string): string; | ||
|
||
/** | ||
* Normalize line endings in text to LF (Unix, OS X) | ||
* @return string with line endings normalized to \n | ||
*/ | ||
export function lf(text: string): string; | ||
|
||
/** | ||
* Normalize line endings in text to CR (Mac OS) | ||
* @return string with line endings normalized to \r | ||
*/ | ||
export function cr(text: string): string; | ||
|
||
/** | ||
* Add linebreak before text | ||
* @return string with linebreak added before text | ||
*/ | ||
export function before(text: string): string; | ||
|
||
/** | ||
* Add linebreak after text | ||
* @return string with linebreak added after text | ||
*/ | ||
export function after(text: string): string; | ||
} | ||
|
||
declare module "eol" { | ||
export = eol; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,5 +50,7 @@ | |
"supernew": true, | ||
"undef": true, | ||
"unused": true | ||
} | ||
}, | ||
"types": "./index.d.ts", | ||
"typings": "./index.d.ts" | ||
} |