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
@zenfs/core v0.12.5 is unusable in a downstream TypeScript project where the tsconfig.json has tight typecheck settings: noImplicitOverride, noImplicitReturns, noUncheckedIndexedAccess, noUnusedLocals.
corepack pnpm tsc command gives the following errors:
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/backend.ts(119,54): error TS2532: Object is possibly 'undefined'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/fetch.ts(78,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'IndexFS'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/fetch.ts(101,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'IndexFS'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/index/fs.ts(15,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'ReadonlyFS & FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/index/index.ts(54,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Map<string, Stats>'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/overlay.ts(41,8): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/overlay.ts(72,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/overlay.ts(476,10): error TS6133: 'operateOnWritable' is declared but its value is never read.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/overlay.ts(487,16): error TS6133: 'operateOnWritableAsync' is declared but its value is never read.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/port/fs.ts(155,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'AsyncFS & FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/port/fs.ts(173,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'AsyncFS & FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/port/fs.ts(207,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'AsyncFS & FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(34,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(53,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(98,9): error TS2322: Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(123,48): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(127,22): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(167,9): error TS2322: Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(192,46): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(196,20): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(513,3): error TS2322: Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(542,3): error TS2322: Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(795,44): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(818,21): error TS2345: Argument of type 'bigint | undefined' is not assignable to parameter of type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/backends/store/fs.ts(841,4): error TS2322: Type 'bigint | undefined' is not assignable to type 'bigint'.
Type 'undefined' is not assignable to type 'bigint'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/async.ts(651,8): error TS6133: 'mode' is declared but its value is never read.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(9,14): error TS2720: Class 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent' incorrectly implements class 'import("fs").Dirent'. Did you mean to extend 'import("fs").Dirent' and inherit its members as a subclass?
Property 'parentPath' is missing in type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent' but required in type 'import("fs").Dirent'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(95,2): error TS2416: Property 'read' in type 'Dir' is not assignable to the same property in base type 'Dir'.
Type '{ (): Promise<Dirent | null>; (cb: Callback<[Dirent | null]>): void; }' is not assignable to type '{ (): Promise<Dirent | null>; (cb: (err: ErrnoException | null, dirEnt: Dirent | null) => void): void; }'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(96,2): error TS2416: Property 'read' in type 'Dir' is not assignable to the same property in base type 'Dir'.
Type '{ (): Promise<Dirent | null>; (cb: Callback<[Dirent | null]>): void; }' is not assignable to type '{ (): Promise<Dirent | null>; (cb: (err: ErrnoException | null, dirEnt: Dirent | null) => void): void; }'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(97,2): error TS2416: Property 'read' in type 'Dir' is not assignable to the same property in base type 'Dir'.
Type '{ (): Promise<Dirent | null>; (cb: Callback<[Dirent | null]>): void; }' is not assignable to type '{ (): Promise<Dirent | null>; (cb: (err: ErrnoException | null, dirEnt: Dirent | null) => void): void; }'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(110,2): error TS2416: Property 'readSync' in type 'Dir' is not assignable to the same property in base type 'Dir'.
Type '() => import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent | null' is not assignable to type '() => import("fs").Dirent | null'.
Type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent | null' is not assignable to type 'import("fs").Dirent | null'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir.ts(123,2): error TS2416: Property '[Symbol.asyncIterator]' in type 'Dir' is not assignable to the same property in base type 'Dir'.
Type '() => AsyncIterableIterator<import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent>' is not assignable to type '() => AsyncIterableIterator<import("fs").Dirent>'.
Type 'AsyncIterableIterator<import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent>' is not assignable to type 'AsyncIterableIterator<import("fs").Dirent>'.
Type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent' is not assignable to type 'import("fs").Dirent'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/path.ts(59,4): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/promises.ts(711,9): error TS1360: Type '{ (path: PathLike, options?: BufferEncoding | (ObjectEncodingOptions & { withFileTypes?: false | undefined; recursive?: boolean | undefined; }) | null | undefined): Promise<...>; (path: PathLike, options: BufferEncodingOption & { ...; }): Promise<...>; (path: PathLike, options?: BufferEncoding | ... 2 more ... | und...' does not satisfy the expected type '{ (path: PathLike, options?: BufferEncoding | (ObjectEncodingOptions & { withFileTypes?: false | undefined; recursive?: boolean | undefined; }) | null | undefined): Promise<...>; (path: PathLike, options: "buffer" | { ...; }): Promise<...>; (path: PathLike, options?: BufferEncoding | ... 2 more ... | undefined): Pro...'.
Types of parameters 'options' and 'options' are incompatible.
Type 'ObjectEncodingOptions & { withFileTypes: true; recursive?: boolean | undefined; }' is not assignable to type 'BufferEncoding | (ObjectEncodingOptions & { withFileTypes?: false | undefined; recursive?: boolean | undefined; }) | null | undefined'.
Type 'ObjectEncodingOptions & { withFileTypes: true; recursive?: boolean | undefined; }' is not assignable to type 'ObjectEncodingOptions & { withFileTypes?: false | undefined; recursive?: boolean | undefined; }'.
Type 'ObjectEncodingOptions & { withFileTypes: true; recursive?: boolean | undefined; }' is not assignable to type '{ withFileTypes?: false | undefined; recursive?: boolean | undefined; }'.
Types of property 'withFileTypes' are incompatible.
Type 'true' is not assignable to type 'false'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/promises.ts(999,9): error TS1360: Type '(path: import("fs").PathLike, options?: import("fs").OpenDirOptions | undefined) => Promise<import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dir>' does not satisfy the expected type '(path: import("fs").PathLike, options?: import("fs").OpenDirOptions | undefined) => Promise<import("fs").Dir>'.
Type 'Promise<import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dir>' is not assignable to type 'Promise<import("fs").Dir>'.
Type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dir' is not assignable to type 'import("fs").Dir'.
The types returned by 'read()' are incompatible between these types.
Type 'Promise<import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent | null>' is not assignable to type 'Promise<import("fs").Dirent | null>'.
Type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent | null' is not assignable to type 'import("fs").Dirent | null'.
Property 'parentPath' is missing in type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dirent' but required in type 'import("fs").Dirent'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/sync.ts(485,8): error TS6133: 'recursive' is declared but its value is never read.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/sync.ts(539,13): error TS1360: Type '{ (path: PathLike, options?: BufferEncoding | { recursive?: boolean | undefined; encoding?: BufferEncoding | null | undefined; withFileTypes?: false | undefined; } | null | undefined): string[]; (path: PathLike, options: "buffer" | { ...; }): Buffer[]; (path: PathLike, options: { ...; }): Dirent[]; (path: PathLike, ...' does not satisfy the expected type '{ (path: PathLike, options?: BufferEncoding | { encoding: BufferEncoding | null; withFileTypes?: false | undefined; recursive?: boolean | undefined; } | null | undefined): string[]; (path: PathLike, options: "buffer" | { ...; }): Buffer[]; (path: PathLike, options?: BufferEncoding | ... 2 more ... | undefined): stri...'.
Types of parameters 'options' and 'options' are incompatible.
Type 'ObjectEncodingOptions & { withFileTypes: true; recursive?: boolean | undefined; }' is not assignable to type 'BufferEncoding | { recursive?: boolean | undefined; encoding?: BufferEncoding | null | undefined; withFileTypes?: false | undefined; } | null | undefined'.
Type 'ObjectEncodingOptions & { withFileTypes: true; recursive?: boolean | undefined; }' is not assignable to type '{ recursive?: boolean | undefined; encoding?: BufferEncoding | null | undefined; withFileTypes?: false | undefined; }'.
Types of property 'withFileTypes' are incompatible.
Type 'true' is not assignable to type 'false'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/sync.ts(835,13): error TS1360: Type '(path: import("fs").PathLike, options?: import("fs").OpenDirOptions | undefined) => import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dir' does not satisfy the expected type '(path: import("fs").PathLike, options?: import("fs").OpenDirOptions | undefined) => import("fs").Dir'.
Type 'import("/home/ubuntu/zenfs-demo/node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/emulation/dir").Dir' is not assignable to type 'import("fs").Dir'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/error.ts(289,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Error'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/file.ts(675,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PreloadFile<T>'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/file.ts(681,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PreloadFile<T>'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/file.ts(687,15): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PreloadFile<T>'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/file.ts(693,9): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'PreloadFile<T>'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/filesystem.ts(247,16): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/filesystem.ts(369,16): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/filesystem.ts(387,10): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/filesystem.ts(465,10): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/filesystem.ts(552,10): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'FileSystem'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(89,14): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(90,31): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(91,31): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(92,31): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'.
Type 'undefined' is not assignable to type 'number'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(97,4): error TS2322: Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(107,21): error TS18048: 'dy' is possibly 'undefined'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(107,43): error TS18048: 'dy' is possibly 'undefined'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(107,62): error TS18048: 'dy' is possibly 'undefined'.
node_modules/.pnpm/@[email protected]/node_modules/@zenfs/core/src/utils.ts(108,4): error TS2322: Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
Potential solution
@zenfs/core package should publish only .js and .d.ts files, not the original TypeScript source code, so that the ZenFS TypeScript source code would not be typechecked in downstream projects. microsoft/TypeScript#47387 (comment)
The text was updated successfully, but these errors were encountered:
yoursunny
added a commit
to yoursunny/zenfs-core
that referenced
this issue
May 25, 2024
@zenfs/core v0.12.5 is unusable in a downstream TypeScript project where the tsconfig.json has tight typecheck settings: noImplicitOverride, noImplicitReturns, noUncheckedIndexedAccess, noUnusedLocals.
Snippet to reproduce
tsconfig.json
package.json
main.ts
Error messages
corepack pnpm tsc command gives the following errors:
Potential solution
@zenfs/core package should publish only
.js
and.d.ts
files, not the original TypeScript source code, so that the ZenFS TypeScript source code would not be typechecked in downstream projects.microsoft/TypeScript#47387 (comment)
The text was updated successfully, but these errors were encountered: