Skip to content

Internal Error: Unable to follow symbol for "const" when using as const #283

@panvourtsis

Description

@panvourtsis

Describe the bug

While i am using the plugin i found a problem that it cannot handle as const constants when passing to type. This is when the rollupTypes is true

image

Reproduction

https://stackblitz.com/~/github.com/panvourtsis/react-blogs/tree/panvourtsis/showcase-as-const

Steps to reproduce

navigate to the url that is a fork from react-blogs

I've change the Title.tsx with the as const demo prop

run yarn build

System Info

[vite:dts] Internal Error: Unable to follow symbol for "const"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
✓ built in 11.59s
error during build:
Error: Internal Error: Unable to follow symbol for "const"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
    at new InternalError (/home/panvourtsis/react-blogs/node_modules/@rushstack/node-core-library/lib/InternalError.js:24:9)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:328:43)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeChildTree (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeAstSymbol (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:247:18)
    at eval (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:259:34)
    at AstDeclaration.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:168:9)
    at AstDeclaration.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:170:19)
    at AstSymbol.forEachDeclarationRecursive (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbol.js:103:28)
    at AstSymbolTable._analyzeAstSymbol (/home/panvourtsis/react-blogs/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:254:27)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamSomething about upstream packages

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions