Skip to content

Update Storage interface for non-nullable types #9712

Closed
@falsandtru

Description

@falsandtru

https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-interface

TypeScript Version: master

Code

interface Storage {
    readonly length: number;
    clear(): void;
-   getItem(key: string): string;
+   getItem(key: string): string | null;
-   key(index: number): string;
+   key(index: number): string | null;
    removeItem(key: string): void;
    setItem(key: string, data: string): void;
    [key: string]: any;
    [index: number]: string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions