Skip to content

Upgrading from 1.4 to 2.0 gives my localstorage.get syntax error with TypeScript #29

@pkellner

Description

@pkellner

Sorry for not understanding better how to post, but had a working project that just did these two lines:

import ls from 'local-storage';
const user = ls.get('userInfo');

When I upgraded to 2.0, I started getting TypeScrpt error complaining about get.

The error is as follows:

Property 'get' does not exist on type '<T>(key: string, value?: T | undefined) => void'.

If this issue makes no sense, feel free to close. I really don't understand why I'd get an error like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions