21
21
/**
22
22
* Interface defining `isBoolean` with methods for testing for primitives and objects, respectively.
23
23
*/
24
- interface Main {
24
+ interface IsBoolean {
25
25
/**
26
26
* Tests if a value is a boolean.
27
27
*
@@ -53,15 +53,15 @@ interface Main {
53
53
* @returns boolean indicating if a value is a boolean primitive
54
54
*
55
55
* @example
56
- * var bool = isBoolean( true );
56
+ * var bool = isBoolean.isPrimitive ( true );
57
57
* // returns true
58
58
*
59
59
* @example
60
- * var bool = isBoolean( false );
60
+ * var bool = isBoolean.isPrimitive ( false );
61
61
* // returns true
62
62
*
63
63
* @example
64
- * var bool = isBoolean( new Boolean( true ) );
64
+ * var bool = isBoolean.isPrimitive ( new Boolean( true ) );
65
65
* // returns false
66
66
*/
67
67
isPrimitive ( value : any ) : boolean ;
@@ -73,17 +73,39 @@ interface Main {
73
73
* @returns boolean indicating if a value is a boolean object
74
74
*
75
75
* @example
76
- * var bool = isBoolean( true );
76
+ * var bool = isBoolean.isObject ( true );
77
77
* // returns false
78
78
*
79
79
* @example
80
- * var bool = isBoolean( new Boolean( false ) );
80
+ * var bool = isBoolean.isObject ( new Boolean( false ) );
81
81
* // returns true
82
82
*/
83
83
isObject ( value : any ) : boolean ;
84
84
}
85
85
86
- declare var isBoolean : Main ;
86
+ /**
87
+ * Tests if a value is a boolean.
88
+ *
89
+ * @param value - value to test
90
+ * @returns boolean indicating whether value is a boolean
91
+ *
92
+ * @example
93
+ * var bool = isBoolean( false );
94
+ * // returns true
95
+ *
96
+ * @example
97
+ * var bool = isBoolean( true );
98
+ * // returns true
99
+ *
100
+ * @example
101
+ * var bool = isBoolean( new Boolean( false ) );
102
+ * // returns true
103
+ *
104
+ * @example
105
+ * var bool = isBoolean( new Boolean( true ) );
106
+ * // returns true
107
+ */
108
+ declare var isBoolean : IsBoolean ;
87
109
88
110
89
111
// EXPORTS //
0 commit comments