@@ -107,7 +107,7 @@ export class StyleSheet {
107107 if ( styleInstructions . font && isObject ( styleInstructions . font ) ) {
108108 style . fontId = this . createFontStyle ( styleInstructions . font ) . id ;
109109 } else if ( styleInstructions . font ) {
110- if ( Number . isNaN ( Number . parseInt ( styleInstructions . font , 10 ) ) ) {
110+ if ( Number . isNaN ( Number . parseInt ( styleInstructions . font as unknown as string , 10 ) ) ) {
111111 throw new Error ( 'Passing a non-numeric font id is not supported' ) ;
112112 }
113113 style . fontId = styleInstructions . font ;
@@ -116,7 +116,7 @@ export class StyleSheet {
116116 if ( styleInstructions . format && isString ( styleInstructions . format ) ) {
117117 style . numFmtId = this . createNumberFormatter ( styleInstructions . format ) . id ;
118118 } else if ( styleInstructions . format ) {
119- if ( Number . isNaN ( Number . parseInt ( styleInstructions . format , 10 ) ) ) {
119+ if ( Number . isNaN ( Number . parseInt ( styleInstructions . format as unknown as string , 10 ) ) ) {
120120 throw new Error ( 'Invalid number formatter id' ) ;
121121 }
122122 style . numFmtId = styleInstructions . format ;
@@ -125,7 +125,7 @@ export class StyleSheet {
125125 if ( styleInstructions . border && isObject ( styleInstructions . border ) ) {
126126 style . borderId = this . createBorderFormatter ( styleInstructions . border ) . id ;
127127 } else if ( styleInstructions . border ) {
128- if ( Number . isNaN ( Number . parseInt ( styleInstructions . border , 10 ) ) ) {
128+ if ( Number . isNaN ( Number . parseInt ( styleInstructions . border as unknown as string , 10 ) ) ) {
129129 throw new Error ( 'Passing a non-numeric border id is not supported' ) ;
130130 }
131131 style . borderId = styleInstructions . border ;
@@ -134,7 +134,7 @@ export class StyleSheet {
134134 if ( styleInstructions . fill && isObject ( styleInstructions . fill ) ) {
135135 style . fillId = this . createFill ( styleInstructions . fill ) . id ;
136136 } else if ( styleInstructions . fill ) {
137- if ( Number . isNaN ( Number . parseInt ( styleInstructions . fill , 10 ) ) ) {
137+ if ( Number . isNaN ( Number . parseInt ( styleInstructions . fill as unknown as string , 10 ) ) ) {
138138 throw new Error ( 'Passing a non-numeric fill id is not supported' ) ;
139139 }
140140 style . fillId = styleInstructions . fill ;
0 commit comments