1
1
import {
2
+ CURRIED_COMPONENT ,
3
+ CURRIED_HELPER ,
2
4
VM_APPEND_DOCUMENT_FRAGMENT_OP ,
3
5
VM_APPEND_HTML_OP ,
4
6
VM_APPEND_NODE_OP ,
@@ -17,7 +19,7 @@ import {
17
19
import { hasInternalComponentManager , hasInternalHelperManager } from '@glimmer/manager' ;
18
20
import { isConstRef , valueForRef } from '@glimmer/reference' ;
19
21
import { isObject } from '@glimmer/util' ;
20
- import { ContentType , CurriedType } from '@glimmer/vm' ;
22
+ import { ContentType } from '@glimmer/vm' ;
21
23
22
24
import { isCurriedType } from '../../curried-value' ;
23
25
import { isEmpty , isFragment , isNode , isSafeString , shouldCoerce } from '../../dom/normalize' ;
@@ -30,14 +32,11 @@ function toContentType(value: unknown) {
30
32
if ( shouldCoerce ( value ) ) {
31
33
return ContentType . String ;
32
34
} else if (
33
- isCurriedType ( value , CurriedType . Component ) ||
35
+ isCurriedType ( value , CURRIED_COMPONENT ) ||
34
36
hasInternalComponentManager ( value as object )
35
37
) {
36
38
return ContentType . Component ;
37
- } else if (
38
- isCurriedType ( value , CurriedType . Helper ) ||
39
- hasInternalHelperManager ( value as object )
40
- ) {
39
+ } else if ( isCurriedType ( value , CURRIED_HELPER ) || hasInternalHelperManager ( value as object ) ) {
41
40
return ContentType . Helper ;
42
41
} else if ( isSafeString ( value ) ) {
43
42
return ContentType . SafeString ;
@@ -55,12 +54,12 @@ function toDynamicContentType(value: unknown) {
55
54
return ContentType . String ;
56
55
}
57
56
58
- if ( isCurriedType ( value , CurriedType . Component ) || hasInternalComponentManager ( value ) ) {
57
+ if ( isCurriedType ( value , CURRIED_COMPONENT ) || hasInternalComponentManager ( value ) ) {
59
58
return ContentType . Component ;
60
59
} else {
61
60
if (
62
61
import . meta. env . DEV &&
63
- ! isCurriedType ( value , CurriedType . Helper ) &&
62
+ ! isCurriedType ( value , CURRIED_HELPER ) &&
64
63
! hasInternalHelperManager ( value )
65
64
) {
66
65
throw new Error (
0 commit comments