File tree Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 55---
66
77Added a safe bail-out for when extract-react-types encounters an unsupported keyword or syntax.
8- In that case, the type will be output as a raw string and summary type will be ` unsupported ` .
8+ In that case, the type will be output as a raw string and summary type will be ` raw ` .
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ Object {
187187 ],
188188 " optional" : false ,
189189 " value" : Object {
190- " kind" : " unsupported " ,
190+ " kind" : " raw " ,
191191 " name" : " keyof Bar" ,
192192 },
193193 },
@@ -223,7 +223,7 @@ Object {
223223 ],
224224 " optional" : false ,
225225 " value" : Object {
226- " kind" : " unsupported " ,
226+ " kind" : " raw " ,
227227 " name" : " keyof Bar" ,
228228 },
229229 },
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import * as K from './kinds';
1616
1717export type * from './kinds' ;
1818
19- const IGNORE_STATEMENT = '@ert-ignore' ;
2019const converters = { } ;
2120
2221function convertObject ( path , context ) {
@@ -1245,9 +1244,7 @@ function attachComments(source, dest) {
12451244function parseComment ( commentProperty ) {
12461245 return commentProperty . map ( comment => ( {
12471246 type : comment . type === 'CommentLine' ? 'commentLine' : 'commentBlock' ,
1248- value : normalizeComment ( comment )
1249- . replace ( IGNORE_STATEMENT , '' )
1250- . trim ( ) ,
1247+ value : normalizeComment ( comment ) ,
12511248 raw : comment . value
12521249 } ) ) ;
12531250}
@@ -1283,7 +1280,7 @@ function convert(path, context) {
12831280 // Fallback to a raw string if property uses a type without a matching converter
12841281 if ( propertySignature && propertySignature . node ) {
12851282 return {
1286- kind : 'unsupported ' ,
1283+ kind : 'raw ' ,
12871284 name : path . getSource ( )
12881285 } ;
12891286 }
Original file line number Diff line number Diff line change @@ -316,10 +316,7 @@ from file: ${convert(type.source, mode)}`
316316 } ,
317317
318318 // ERT - Misc
319- unsupported : ( type : any ) : string => {
320- console . log ( 'HERE' ) ;
321- return type . name ;
322- }
319+ raw : ( type : any ) : string => type . name
323320} ;
324321
325322function convert ( type : any , mode : string = 'value' ) {
You can’t perform that action at this time.
0 commit comments