mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 11:51:10 +08:00
27 lines
324 B
TypeScript
27 lines
324 B
TypeScript
import type from 'type-detect';
|
|
|
|
// $ExpectType string
|
|
type(123);
|
|
|
|
// $ExpectType string
|
|
type('foo');
|
|
|
|
// $ExpectType string
|
|
type({});
|
|
|
|
// $ExpectType string
|
|
type([]);
|
|
|
|
// $ExpectType string
|
|
type(null);
|
|
|
|
// $ExpectType string
|
|
type(undefined);
|
|
|
|
// $ExpectType string
|
|
type(new Map());
|
|
|
|
// $ExpectType string
|
|
type(new Set());
|
|
|