Merge pull request #26482 from viralpickaxe/added-runes

Added types for runes
This commit is contained in:
Nathan Shively-Sanders
2018-06-19 14:14:01 -07:00
committed by GitHub
4 changed files with 39 additions and 0 deletions

11
types/runes/index.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// Type definitions for runes 0.4
// Project: https://github.com/dotcypress/runes
// Definitions by: Jamie Davies <https://github.com/viralpickaxe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function runes(text: string): string[];
declare namespace runes {
function substr(text: string, index: number): string;
}
export = runes;

View File

@@ -0,0 +1,4 @@
import runes = require('runes');
runes('hello world 😁');
runes.substr('hello world 😁', 1);

23
types/runes/tsconfig.json Normal file
View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"strictFunctionTypes": true
},
"files": [
"index.d.ts",
"runes-tests.ts"
]
}

1
types/runes/tslint.json Normal file
View File

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