diff --git a/types/runes/index.d.ts b/types/runes/index.d.ts new file mode 100644 index 0000000000..09e1330c35 --- /dev/null +++ b/types/runes/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for runes 0.4 +// Project: https://github.com/dotcypress/runes +// Definitions by: Jamie Davies +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function runes(text: string): string[]; +declare namespace runes { + function substr(text: string, index: number): string; +} + +export = runes; diff --git a/types/runes/runes-tests.ts b/types/runes/runes-tests.ts new file mode 100644 index 0000000000..767be2dccb --- /dev/null +++ b/types/runes/runes-tests.ts @@ -0,0 +1,4 @@ +import runes = require('runes'); + +runes('hello world 😁'); +runes.substr('hello world 😁', 1); diff --git a/types/runes/tsconfig.json b/types/runes/tsconfig.json new file mode 100644 index 0000000000..87ca6191c5 --- /dev/null +++ b/types/runes/tsconfig.json @@ -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" + ] +} diff --git a/types/runes/tslint.json b/types/runes/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/runes/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }