Skip to content

Update Storage interface for non-nullable types #9712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
falsandtru opened this issue Jul 13, 2016 · 0 comments
Closed

Update Storage interface for non-nullable types #9712

falsandtru opened this issue Jul 13, 2016 · 0 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@falsandtru
Copy link
Contributor

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;
}
@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this labels Jul 17, 2016
@mhegazy mhegazy closed this as completed Jul 17, 2016
@mhegazy mhegazy added Fixed in TSJS repo and removed Help Wanted You can do this labels Jul 17, 2016
@mhegazy mhegazy added this to the TypeScript 2.1 milestone Jul 17, 2016
@mhegazy mhegazy reopened this Jul 17, 2016
@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo labels Aug 22, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.0.1, TypeScript 2.1 Aug 22, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants