Add types for esrever (#38048)

This commit is contained in:
Yuichiro Tsuchiya
2019-09-05 16:04:39 -07:00
committed by Andrew Casey
parent 25731aaec0
commit 71ce6eca63
4 changed files with 45 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
import * as esrever from "esrever";
esrever.version; // $ExpectType string
esrever.reverse("abc"); // $ExpectType string
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for esrever 0.2
// Project: https://github.com/mathiasbynens/esrever
// Definitions by: Yuichiro Tsuchiya <https://github.com/tuttieee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace esrever;
/**
* A string representing the semantic version number.
*/
export const version: string;
/**
* This function takes a string and returns the reversed version of that string,
* correctly accounting for Unicode combining marks and astral symbols.
*/
export function reverse(text: string): string;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"esrever-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }