Skip to content
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

index.d.ts is not included in the published npm package #12

Closed
regevbr opened this issue Mar 9, 2019 · 4 comments
Closed

index.d.ts is not included in the published npm package #12

regevbr opened this issue Mar 9, 2019 · 4 comments

Comments

@regevbr
Copy link
Contributor

regevbr commented Mar 9, 2019

index.d.ts is not included in the published npm package

@regevbr
Copy link
Contributor Author

regevbr commented Mar 9, 2019

also need to make the Item generic... For example:

declare module 'linked-list' {
  class List<T extends List.Item> implements Iterable<T> {
    public static of<T extends List.Item>(...items: T[]): List<T>;

    public static from<T extends List.Item>(items: Iterable<T>): List<T>;

    public head: T | null;
    public tail: T | null;

    constructor(...items: T[])

    public toArray(): T[];

    public prepend<T>(item: T): T;

    public append<T>(item: T): T;

    public [Symbol.iterator](): Iterator<T>;
  }

  namespace List {
    export class Item {
      public prev: this;
      public next: this;
      public list: List<this>;

      public detach(): this;

      public prepend<T extends Item>(item: T): T;

      public append<T extends Item>(item: T): T;
    }
  }

  export = List;
}

@wooorm
Copy link
Owner

wooorm commented Mar 11, 2019

@regevbr Changing things should happen before cutting a release. Could you open a PR if you want the above in the release?

@regevbr
Copy link
Contributor Author

regevbr commented Mar 11, 2019

sure

wooorm pushed a commit that referenced this issue Mar 11, 2019
Related-to GH-12.
Closes GH-13.

Reviewed-by: Blake Embrey <hello@blakeembrey.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
@wooorm
Copy link
Owner

wooorm commented Mar 11, 2019

Released 2.0.0!

@wooorm wooorm closed this as completed Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants