Skip to content

Non generic types Buffer & Uint8Array #1675

@jvanes-awaze

Description

@jvanes-awaze

After upgrading our project to:

    "typescript": "~5.6.3",
    "@smithy/core": "^3.9.0",

The following errors started showing on running tsc

node_modules/@smithy/core/dist-types/submodules/cbor/cbor-types.d.ts:40:46 - error TS2315: Type 'Uint8Array' is not generic.

40 export declare function alloc(size: number): Uint8Array<ArrayBuffer> | Buffer<ArrayBuffer>;
                                                ~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@smithy/core/dist-types/submodules/cbor/cbor-types.d.ts:40:72 - error TS2315: Type 'Buffer' is not generic.

40 export declare function alloc(size: number): Uint8Array<ArrayBuffer> | Buffer<ArrayBuffer>;
                                                                          ~~~~~~~~~~~~~~~~~~~

node_modules/@smithy/core/dist-types/submodules/cbor/cbor.d.ts:13:28 - error TS2315: Type 'Uint8Array' is not generic.

13     serialize(input: any): Uint8Array<ArrayBufferLike>;

Updating the types seems to resolve the issues

Metadata

Metadata

Assignees

Labels

closing-soonThis issue will automatically close in 2 days unless further comments are made.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions