@@ -8,8 +8,7 @@ import ResolvedImage from './types/resolved_image';
88import { NullType , NumberType , StringType , BooleanType , ColorType , ObjectType , ValueType , CollatorType , FormattedType , ResolvedImageType , array , PaddingType , VariableAnchorOffsetCollectionType , ProjectionType } from './types' ;
99
1010import type { Type } from './types' ;
11- import { ProjectionTransition , isProjectionTransition } from '../types.g' ;
12- import { Projection } from '../util/projection' ;
11+ import { Projection } from '../util/projection' ;
1312
1413export function validateRGBA ( r : unknown , g : unknown , b : unknown , a ?: unknown ) : string | null {
1514 if ( ! (
@@ -30,7 +29,7 @@ export function validateRGBA(r: unknown, g: unknown, b: unknown, a?: unknown): s
3029 return null ;
3130}
3231
33- export type Value = null | string | boolean | number | Color | ProjectionTransition | Collator | Formatted | Padding | ResolvedImage | VariableAnchorOffsetCollection | ReadonlyArray < Value > | {
32+ export type Value = null | string | boolean | number | Color | Projection | Collator | Formatted | Padding | ResolvedImage | VariableAnchorOffsetCollection | ReadonlyArray < Value > | {
3433 readonly [ x : string ] : Value ;
3534} ;
3635
@@ -77,7 +76,7 @@ export function typeOf(value: Value): Type {
7776 return NumberType ;
7877 } else if ( value instanceof Color ) {
7978 return ColorType ;
80- } else if ( isProjectionTransition ( value ) ) {
79+ } else if ( value instanceof Projection ) {
8180 return ProjectionType ;
8281 } else if ( value instanceof Collator ) {
8382 return CollatorType ;
@@ -117,11 +116,11 @@ export function toString(value: Value) {
117116 return '' ;
118117 } else if ( type === 'string' || type === 'number' || type === 'boolean' ) {
119118 return String ( value ) ;
120- } else if ( value instanceof Color || isProjectionTransition ( value ) || value instanceof Formatted || value instanceof Padding || value instanceof VariableAnchorOffsetCollection || value instanceof ResolvedImage ) {
119+ } else if ( value instanceof Color || value instanceof Projection || value instanceof Formatted || value instanceof Padding || value instanceof VariableAnchorOffsetCollection || value instanceof ResolvedImage ) {
121120 return value . toString ( ) ;
122121 } else {
123122 return JSON . stringify ( value ) ;
124123 }
125124}
126125
127- export { Color , Collator , ProjectionTransition as Projection , Padding , VariableAnchorOffsetCollection } ;
126+ export { Color , Collator , Projection , Padding , VariableAnchorOffsetCollection } ;
0 commit comments