mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
New package: parse-unit
Signed-off-by: Jack Works <zjwpeter@gmail.com>
This commit is contained in:
parent
56dbab7087
commit
81b60b07a3
7
parse-unit/index.d.ts
vendored
Normal file
7
parse-unit/index.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// Type definitions for parse-unit 1.0
|
||||
// Project: https://github.com/mattdesl/parse-unit
|
||||
// Definitions by: Jack Works <https://github.com/Jack-Works>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function parse(value: string): [number, string];
|
||||
export = parse;
|
||||
4
parse-unit/parse-unit-tests.ts
Normal file
4
parse-unit/parse-unit-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import parse = require('parse-unit')
|
||||
let [number, length] = parse('10px')
|
||||
number === 50
|
||||
length === 'px'
|
||||
23
parse-unit/tsconfig.json
Normal file
23
parse-unit/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"parse-unit-tests.ts"
|
||||
]
|
||||
}
|
||||
1
parse-unit/tslint.json
Normal file
1
parse-unit/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user