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
The StorageFileApi.bucketId field type is bucketId?: string, which breaks when exactOptionalPropertyTypes is on. This causes headaches for folks trying to use the library with the flag on.
To Reproduce
Create project, add @supabase/supabase-js
turn on flag "exactOptionalPropertyTypes" in tsconfig
tsc
Expected behavior
Compiles without errors
Additional context
TypeScript itself recommends using this flag. The reason it is not in strict is just to avoid breaking too much existing user code.
Right now, anyone with this flag on can't use the library without it failing to compile. Using skipLibCheck isn't great because it skips all .d.ts files, including user-made ones (see this issue).
Except for the one field I fixed, the package already follows this rule.
In my current project with 58 libraries, this is the only one that breaks with the flag on, indicating it's already a standard in the ecosystem.
These tweaks should make the library more robust and play better with strict TS setups, without causing issues for current users. Let me know if you need any more info!
Bug report
Describe the bug
The StorageFileApi.bucketId field type is
bucketId?: string
, which breaks when exactOptionalPropertyTypes is on. This causes headaches for folks trying to use the library with the flag on.To Reproduce
tsc
Expected behavior
Compiles without errors
Additional context
TypeScript itself recommends using this flag. The reason it is not in
strict
is just to avoid breaking too much existing user code.Right now, anyone with this flag on can't use the library without it failing to compile. Using
skipLibCheck
isn't great because it skips all.d.ts
files, including user-made ones (see this issue).Except for the one field I fixed, the package already follows this rule.
In my current project with 58 libraries, this is the only one that breaks with the flag on, indicating it's already a standard in the ecosystem.
These tweaks should make the library more robust and play better with strict TS setups, without causing issues for current users. Let me know if you need any more info!
PR Here
#205
The text was updated successfully, but these errors were encountered: