(obj: any)
| 93 | * @returns string |
| 94 | */ |
| 95 | export function isJSSlot(obj: any): obj is IPublicTypeJSSlot { |
| 96 | if (!obj) { |
| 97 | return false; |
| 98 | } |
| 99 | if (typeof obj !== 'object' || Array.isArray(obj)) { |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | // Compatible with the old protocol JSBlock |
| 104 | return [EXPRESSION_TYPE.JSSLOT, EXPRESSION_TYPE.JSBLOCK].includes(obj.type); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * get value from an object |
no outgoing calls
no test coverage detected
searching dependent graphs…