mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
minimalistic-assert: initial definition (#38765)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
624778c4fa
commit
40b3fa23f6
12
types/minimalistic-assert/index.d.ts
vendored
Normal file
12
types/minimalistic-assert/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for minimalistic-assert 1.0
|
||||
// Project: https://github.com/calvinmetcalf/minimalistic-assert
|
||||
// Definitions by: Junxiao Shi <https://github.com/yoursunny>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function assert(val: any, msg?: string): void;
|
||||
|
||||
declare namespace assert {
|
||||
function equal<T>(l: T, r: T, msg?: string): void;
|
||||
}
|
||||
|
||||
export = assert;
|
||||
10
types/minimalistic-assert/minimalistic-assert-tests.ts
Normal file
10
types/minimalistic-assert/minimalistic-assert-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import assert = require("minimalistic-assert");
|
||||
|
||||
assert(true);
|
||||
assert(false, "error");
|
||||
assert("yes");
|
||||
assert(0, "error");
|
||||
|
||||
assert.equal(1, 1);
|
||||
assert.equal(2, 1, "error");
|
||||
assert.equal("ok", "ok");
|
||||
23
types/minimalistic-assert/tsconfig.json
Normal file
23
types/minimalistic-assert/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"minimalistic-assert-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/minimalistic-assert/tslint.json
Normal file
1
types/minimalistic-assert/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user