You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive an "internal error" when creating the rollup and using a satisfies type for a generic function
Summary
Not completely sure what's going on of course, but when attempting to make functions that follow a contract, I receive an error from AstSymbolTable.js, which I believe is linked to different generics at play here.
// If you encounter this, please report a bug with a repro. We're interested to know
// how it can occur.
throw new node_core_library_1.InternalError(
`Unable to follow symbol for "${identifierNode.text}"`
);
Expected result: builds, valid rollup gets created
Actual result: does not build, if internal error is ignored/commented out, an invalid rollup gets created with a generic in an argument that isn't defined.
Details
I think this may be related to the "hits", "infiniteHits" and "geoSearch" widgets that I'm attempting to make properly generic now. A notable change is that both "levels" of function are now typed with satisfies instead of const x: T = function x to ensure it can be generic.
Also relevant can be to show how the output rollup.d.ts is wrong:
I think I could work around this issue if there was a way to declare a function with a known contract, but that has a generic (unlike before this PR where the type gets resolved and the generic "filled in" with the default value, and you can't pass it at usage)
I receive an "internal error" when creating the rollup and using a satisfies type for a generic function
Summary
Not completely sure what's going on of course, but when attempting to make functions that follow a contract, I receive an error from AstSymbolTable.js, which I believe is linked to different generics at play here.
Repro steps
This can be reproduced by running
yarn && yarn workspace instantsearch.js build:types
in algolia/instantsearch@2a36c37 (part of this algolia/instantsearch#6218 PR)Expected result: builds, valid rollup gets created
Actual result: does not build, if internal error is ignored/commented out, an invalid rollup gets created with a generic in an argument that isn't defined.
Details
I think this may be related to the "hits", "infiniteHits" and "geoSearch" widgets that I'm attempting to make properly generic now. A notable change is that both "levels" of function are now typed with
satisfies
instead ofconst x: T = function x
to ensure it can be generic.Also relevant can be to show how the output rollup.d.ts is wrong:
(TWidgetParams is not defined here)
output with
showDiagnostics: true
: output.txtStandard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?The text was updated successfully, but these errors were encountered: