@@ -168,7 +168,7 @@ function getStoredNodeSchemaType(nodeSchema: TreeNodeStoredSchema): SchemaFactor
168168 if ( nodeSchema instanceof LeafNodeStoredSchema ) {
169169 return LeafNodeStoredSchema ;
170170 }
171- fail ( " Invalid stored node schema type" ) ;
171+ fail ( 0xbe8 /* Invalid stored node schema type */ ) ;
172172}
173173
174174function doesNodeKindMatchStoredNodeKind (
@@ -286,7 +286,7 @@ function* getNodeDiscrepancies(
286286 case NodeKind . Object : {
287287 assert (
288288 isObjectNodeSchema ( view ) ,
289- " schema with node kind of object must implement ObjectNodeSchema" ,
289+ 0xbe9 /* schema with node kind of object must implement ObjectNodeSchema */ ,
290290 ) ;
291291 const fields : SimpleKeyMap | undefined = view . flexKeyMap ;
292292 const differences = Array . from (
@@ -305,7 +305,7 @@ function* getNodeDiscrepancies(
305305 case NodeKind . Array : {
306306 assert (
307307 isArrayNodeSchema ( view ) ,
308- " schema with node kind of array must implement ArrayNodeSchema" ,
308+ 0xbea /* schema with node kind of array must implement ArrayNodeSchema */ ,
309309 ) ;
310310 const fields : SimpleKeyMap = new Map ( [
311311 [
@@ -338,7 +338,7 @@ function* getNodeDiscrepancies(
338338 case NodeKind . Map : {
339339 assert (
340340 isMapNodeSchema ( view ) ,
341- " schema with node kind of map must implement MapNodeSchema" ,
341+ 0xbeb /* schema with node kind of map must implement MapNodeSchema */ ,
342342 ) ;
343343
344344 yield * getFieldDiscrepancies (
@@ -352,7 +352,7 @@ function* getNodeDiscrepancies(
352352 case NodeKind . Record : {
353353 assert (
354354 isRecordNodeSchema ( view ) ,
355- " schema with node kind of record must implement RecordNodeSchema" ,
355+ 0xbec /* schema with node kind of record must implement RecordNodeSchema */ ,
356356 ) ;
357357
358358 yield * getFieldDiscrepancies (
@@ -366,7 +366,7 @@ function* getNodeDiscrepancies(
366366 case NodeKind . Leaf : {
367367 assert (
368368 view instanceof LeafNodeSchema ,
369- " schema with node kind of leaf must implement LeafNodeSchema" ,
369+ 0xbed /* schema with node kind of leaf must implement LeafNodeSchema */ ,
370370 ) ;
371371 // TODO: leafKind seems like a bad name
372372 const viewValue = view . leafKind ;
@@ -429,7 +429,10 @@ function* getFieldDiscrepancies(
429429 // TODO: This is a temporary workaround until the comparison logic is redesigned.
430430 viewKindIsSequence = false ,
431431) : Iterable < FieldDiscrepancy > {
432- assert ( view instanceof FieldSchemaAlpha , "all field schema should be FieldSchemaAlpha" ) ;
432+ assert (
433+ view instanceof FieldSchemaAlpha ,
434+ 0xbee /* all field schema should be FieldSchemaAlpha */ ,
435+ ) ;
433436 const [ viewExtra , storedExtra ] = findExtraAllowedTypes (
434437 view . annotatedAllowedTypesNormalized . types ,
435438 stored . types ,
@@ -446,7 +449,7 @@ function* getFieldDiscrepancies(
446449
447450 const viewKind =
448451 convertFieldKind . get ( view . kind ) ??
449- fail ( " A conversion from a FieldKind to a FlexFieldKind should exist" ) ;
452+ fail ( 0xbef /* A conversion from a FieldKind to a FlexFieldKind should exist */ ) ;
450453
451454 // This checks if the field kind in the view schema is not compatible with the stored schema.
452455 // We cannot detect if the view schema is a sequence using the kind property so it is passed in separately.
@@ -503,7 +506,7 @@ function* computeObjectNodeDiscrepancies(
503506 if ( storedSchema === undefined ) {
504507 const viewKind =
505508 convertFieldKind . get ( fieldSchema . kind ) ??
506- fail ( " A conversion from a FieldKind to a FlexFieldKind should exist" ) ;
509+ fail ( 0xbf0 /* A conversion from a FieldKind to a FlexFieldKind should exist */ ) ;
507510 yield {
508511 identifier,
509512 fieldKey,
@@ -627,7 +630,7 @@ export function comparePosetElements<T>(
627630 for ( const extension of realizer ) {
628631 const aIndex = extension . get ( a ) ;
629632 const bIndex = extension . get ( b ) ;
630- assert ( aIndex !== undefined && bIndex !== undefined , " Invalid realizer" ) ;
633+ assert ( aIndex !== undefined && bIndex !== undefined , 0xbf1 /* Invalid realizer */ ) ;
631634 if ( aIndex < bIndex ) {
632635 hasLessThanResult = true ;
633636 } else if ( aIndex > bIndex ) {
0 commit comments