mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 11:07:32 +08:00
Merge pull request #26482 from viralpickaxe/added-runes
Added types for runes
This commit is contained in:
11
types/runes/index.d.ts
vendored
Normal file
11
types/runes/index.d.ts
vendored
Normal 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;
|
||||
4
types/runes/runes-tests.ts
Normal file
4
types/runes/runes-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import runes = require('runes');
|
||||
|
||||
runes('hello world 😁');
|
||||
runes.substr('hello world 😁', 1);
|
||||
23
types/runes/tsconfig.json
Normal file
23
types/runes/tsconfig.json
Normal 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
1
types/runes/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user