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
{{ message }}
Repository navigation
Missing Complex32 import in @stdlib/types/ndarray causes TS2552 in v0.5.1 #15916
After updating @stdlib/stats from ^0.3.3 to ^0.4.1, TypeScript/Angular compilation fails because @stdlib/types@0.5.1 references Complex32 inside the @stdlib/types/ndarray module without importing it.
Error
TS2552: Cannot find name 'Complex32'. Did you mean 'Complex128'?
../../node_modules/@stdlib/types/index.d.ts:4462:33:
4462 │ get( ...args: Array<number> ): Complex32;
Dependency resolution
@stdlib/stats@0.4.1 resolves to:
@stdlib/types@0.5.1
All other @stdlib/* packages in the dependency tree also resolve to @stdlib/types@0.5.1, so this does not appear to be a multiple-version conflict.
Root cause
In @stdlib/types@0.5.1, the @stdlib/types/ndarray module imports:
And thank you for opening your first issue! We will get back to you shortly. 🏃 💨
If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.
I can confirm this. It's broader than the one error in the report. Compiling @stdlib/types@0.5.1 with TS 5.9 (--strict, lib: es2022, no skipLibCheck) gives three errors in the @stdlib/types/ndarray module:
TS2552: Cannot find name 'Complex32' (L4462)
TS2552: Cannot find name 'Complex32Array' (L4445)
TS2304: Cannot find name 'Float16Array' (L3291, only when lib doesn't include esnext)
complex32ndarray was added in b9502d5 (2026-04-23) without updating that module's imports, and that state shipped in 0.5.0/0.5.1. All three are already fixed on develop by b77ce8d (2026-08-12), and develop's index.d.ts compiles cleanly under the same settings. So no code change is needed, just a new @stdlib/types release.
Until then, "skipLibCheck": true in tsconfig.json avoids the errors. Yarn 4's yarn patch @stdlib/types also works if you'd rather keep lib checking on.
@Planeshifter@kgryte Could we publish a 0.5.2 from current develop? Also, would a CI step that runs tsc on @stdlib/types/index.d.ts without skipLibCheck be welcome? It would have caught this, and I'm happy to open a PR for it.
Activity
stdlib-bot commentedon Oct 5, 2026
👋 Hi there! 👋
And thank you for opening your first issue! We will get back to you shortly. 🏃 💨
If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.
kgryte commentedon Oct 12, 2026
@Planeshifter Mind taking a look at this?
0PrashantYadav0 commentedon Oct 15, 2026
I can confirm this. It's broader than the one error in the report. Compiling
@stdlib/types@0.5.1with TS 5.9 (--strict,lib: es2022, noskipLibCheck) gives three errors in the@stdlib/types/ndarraymodule:TS2552: Cannot find name 'Complex32'(L4462)TS2552: Cannot find name 'Complex32Array'(L4445)TS2304: Cannot find name 'Float16Array'(L3291, only whenlibdoesn't includeesnext)complex32ndarraywas added in b9502d5 (2026-04-23) without updating that module's imports, and that state shipped in 0.5.0/0.5.1. All three are already fixed ondevelopby b77ce8d (2026-08-12), and develop'sindex.d.tscompiles cleanly under the same settings. So no code change is needed, just a new@stdlib/typesrelease.Until then,
"skipLibCheck": trueintsconfig.jsonavoids the errors. Yarn 4'syarn patch @stdlib/typesalso works if you'd rather keep lib checking on.@Planeshifter @kgryte Could we publish a 0.5.2 from current develop? Also, would a CI step that runs
tscon@stdlib/types/index.d.tswithoutskipLibCheckbe welcome? It would have caught this, and I'm happy to open a PR for it.0PrashantYadav0 commentedon Oct 15, 2026
Should I move forward with PR or need to collect more information on this.