Skip to content

Typings #18

Description

@andreyshedko

Does anybody was creating typing for this package?

Activity

  1. andreyshedko commented on Mar 26, 2021

    @andreyshedko
    Author

    This is typing that works for me, probably it can be significantly improved.

    declare function MemoryStorage(id?: string);
    
    declare const Function1: typeof MemoryStorage & MemoryStorage;
    declare namespace _Function1 {
      export interface MemoryStorage {
        setItem: (key: string, value: unknown) => void;
        getItem: (key: string) => unknown;
        clear: () => void;
      }
    }
    export = _Function1;
    
  2. Download commented on Mar 31, 2021

    @Download
    Owner

    Hi @andreyshedko thanks for your comment.
    Would you like to try and make a pull request? I can help you if you want to try this.

  3. Download commented on Mar 31, 2021

    @Download
    Owner

    If you want to take a stab at this:

    • Fork this repo (check the button in the top right of the page)
    • Then Git clone your fork to your local machine
    • Git create a branch, call it e.g. 'feat/typings' or something
    • Make your changes, including your typings, editing package JSON
    • Test your changes (ideally, write a small test, maybe a test.ts file that you compile to check for errors)
    • Git commit your changes
    • Git push your changes to your fork
    • Visit your fork on Github. It will offer to make a Pull Request
    • Create a Pull Request
    • I will check your changes and if they cause no issues, merge them
    • I will create a new release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions