Stop using TypeScript namespace

This enables to use `is.null`, `is.class` and `is.function` in TypeScript without the underscore suffix.
This commit is contained in:
Sindre Sorhus 2019-01-26 18:13:17 +07:00
parent ab586df0f9
commit 7589763724
2 changed files with 203 additions and 220 deletions

View file

@ -33,7 +33,7 @@ const types = new Map<string, Test>([
]
}],
['null', {
is: is.null_,
is: is.null,
fixtures: [
null
]
@ -99,7 +99,7 @@ const types = new Map<string, Test>([
]
}],
['function', {
is: is.function_,
is: is.function,
fixtures: [
// tslint:disable:no-unused no-empty no-unused-variable only-arrow-functions no-function-expression
function foo() {},
@ -685,7 +685,7 @@ test('is.class', t => {
];
for (const x of classDeclarations) {
t.true(is.class_(x));
t.true(is.class(x));
}
});