Commit 4a1780e 1 parent abee599 commit 4a1780e Copy full SHA for 4a1780e
File tree 2 files changed +29
-4
lines changed
2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -3117,22 +3117,22 @@ declare module 'ember' {
3117
3117
/**
3118
3118
* A value is blank if it is empty or a whitespace string.
3119
3119
*/
3120
- function isBlank ( obj : any ) : boolean ;
3120
+ function isBlank ( obj ? : any ) : boolean ;
3121
3121
/**
3122
3122
* Verifies that a value is `null` or an empty string, empty array,
3123
3123
* or empty function.
3124
3124
*/
3125
- function isEmpty ( obj : any ) : boolean ;
3125
+ function isEmpty ( obj ? : any ) : boolean ;
3126
3126
/**
3127
3127
* Returns true if the passed value is null or undefined. This avoids errors
3128
3128
* from JSLint complaining about use of ==, which can be technically
3129
3129
* confusing.
3130
3130
*/
3131
- function isNone ( obj : any ) : obj is null | undefined ;
3131
+ function isNone ( obj ? : any ) : obj is null | undefined ;
3132
3132
/**
3133
3133
* A value is present if it not `isBlank`.
3134
3134
*/
3135
- function isPresent ( obj : any ) : boolean ;
3135
+ function isPresent ( obj ? : any ) : boolean ;
3136
3136
/**
3137
3137
* Merge the contents of two objects together into the first object.
3138
3138
* @deprecated Use Object.assign
Original file line number Diff line number Diff line change @@ -14,6 +14,31 @@ function testIsNoneType() {
14
14
}
15
15
16
16
const anotherString = maybeUndefined + 'another string' ;
17
+ utils . isNone ( ) ; // $ExpectType boolean
18
+ }
19
+
20
+ function testIsBlank ( ) {
21
+ utils . isBlank ( ) ; // $ExpectType boolean
22
+ utils . isBlank ( '' ) ; // $ExpectType boolean
23
+ utils . isBlank ( '' , '' ) ; // $ExpectError
24
+ }
25
+
26
+ function testIsEmpty ( ) {
27
+ utils . isEmpty ( ) ; // $ExpectType boolean
28
+ utils . isEmpty ( '' ) ; // $ExpectType boolean
29
+ utils . isEmpty ( '' , '' ) ; // $ExpectError
30
+ }
31
+
32
+ function testIsPresent ( ) {
33
+ utils . isPresent ( ) ; // $ExpectType boolean
34
+ utils . isPresent ( '' ) ; // $ExpectType boolean
35
+ utils . isPresent ( '' , '' ) ; // $ExpectError
36
+ }
37
+
38
+ function testIsNone ( ) {
39
+ utils . isNone ( ) ; // $ExpectType boolean
40
+ utils . isNone ( '' ) ; // $ExpectType boolean
41
+ utils . isNone ( '' , '' ) ; // $ExpectError
17
42
}
18
43
19
44
function testMerge ( ) {
You can’t perform that action at this time.
0 commit comments