add type-name.d.ts

This commit is contained in:
armorik83
2015-04-21 23:27:50 +09:00
parent cb08e83dd8
commit a20da6e400
2 changed files with 16 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
/// <reference path="./type-name.d.ts" />
import typeName = require("type-name");
console.log(typeName('foo') === 'string');
console.log(typeName([1, 2]) === 'Array');
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for type-name v1.0.1
// Project: https://github.com/twada/type-name/
// Definitions by: OKUNOKENTARO <https://github.com/armorik83>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare function typeName(anyVar: any): string;
declare module typeName {}
declare module "type-name" {
export = typeName;
}