Fix undefined check

This commit is contained in:
Garrett Mills 2022-03-29 02:35:58 -05:00
parent 1fcf5b5205
commit de046d3353

View File

@ -20,7 +20,7 @@ const identifierProgram = (program: ts.Program, options: any) => {
console.log(`Type symbol: ${type.localSymbol?.name} : ${type.id} : ${type.getText()}`) // eslint-disable-line no-console console.log(`Type symbol: ${type.localSymbol?.name} : ${type.id} : ${type.getText()}`) // eslint-disable-line no-console
for ( const decl of interfaceDeclarations ) { for ( const decl of interfaceDeclarations ) {
if ( decl.name.symbol === (type as any).typeName.symbol ) { if ( decl?.name?.symbol === (type as any)?.typeName?.symbol ) {
console.log(`Match to interface: ${decl.name.text}`) // eslint-disable-line no-console console.log(`Match to interface: ${decl.name.text}`) // eslint-disable-line no-console
console.log(decl) // eslint-disable-line no-console console.log(decl) // eslint-disable-line no-console