generated from garrettmills/template-npm-typescript
Fix undefined check
This commit is contained in:
parent
1fcf5b5205
commit
de046d3353
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user