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

Update es6.d.ts for final draft of ES6 specification #2881

Closed
28 tasks done
rbuckton opened this issue Apr 23, 2015 · 6 comments
Closed
28 tasks done

Update es6.d.ts for final draft of ES6 specification #2881

rbuckton opened this issue Apr 23, 2015 · 6 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript ES6 Relates to the ES6 Spec Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@rbuckton
Copy link
Member

rbuckton commented Apr 23, 2015

  • 6.1.5.1 - Add built in symbols to SymbolConstructor: match, replace, search, species, split (from Obsolete 'isRegExp' and several non-mentioned well-known symbols in lib.es6.d.ts #2524).
  • 19.2.3 - Remove Function.toMethod.
  • 19.2.3.6 - Add [Symbol.hasInstance] method to Function interface.
  • 20.3.4.45 - Add [Symbol.toPrimitive] method to Date interface.
  • 21.1.3.7 - Add includes method to String interface, and remove contains
  • 21.1.3.11 - Add overload for match method on String interface that accepts an object with a compatible [Symbol.match] method.
  • 21.1.3.14 - Add overload for replace method on String interface that accepts an object with a compatible [Symbol.replace] method.
  • 21.1.3.15 - Add overload for search method on String interface that accepts an object with a compatible [Symbol.search] method.
  • 21.1.3.17 - Add overload for split method on String interface that accepts an object with a compatible [Symbol.split] method.
  • 21.2.4.2 - Add [Symbol.species] property to RegExpConstructor interface.
  • 21.2.5.6 - Add [Symbol.match] method to RegExp interface.
  • 21.2.5.8 - Add [Symbol.replace] method to RegExp interface.
  • 21.2.5.9 - Add [Symbol.search] method to RegExp interface.
  • 21.2.5.11 - Add [Symbol.split] method to RegExp interface.
  • 22.1.2.5 - Add [Symbol.species] property to ArrayConstructor interface.
  • 22.1.3.31 - Add [Symbol.unscopables] property to Array interface.
  • 22.2.1.4, 22.2.2.1.1 - Add construct signature overload on Typed Array constructor interfaces to allow Iterable<number>.
  • 22.2.2.4 - Add [Symbol.species] property to Typed Array constructor interfaces.
  • 22.2.3.31 - Add [Symbol.toStringTag] property to Typed Array interfaces.
  • 23.1.2.2 - Add [Symbol.species] property to MapConstructor interface.
  • 23.2.2.2 - Add [Symbol.species] property to SetConstructor interface.
  • 24.1.3.3 - Add [Symbol.species] property to ArrayBufferConstructor interface.
  • 25.2.3.3 - Add [Symbol.toStringTag] property to GeneratorFunction interface.
  • 25.4.4.1 - Promise.all can take an iterable.
  • 25.4.4.3 - Promise.race can take an iterable.
  • 25.4.4.6 - Add [Symbol.species] property to PromiseConstructor interface.
  • 25.4.5.4 - Add [Symbol.toStringTag] property to Promise interface.
  • 26.1.2 - Update Reflect.construct to add third newTarget argument.
@mhegazy mhegazy added Bug A bug in TypeScript ES6 Relates to the ES6 Spec Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Apr 23, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Apr 23, 2015
@mhegazy mhegazy self-assigned this Apr 23, 2015
@dead-claudia
Copy link

And it's now the current standard.

@DanielRosenwasser
Copy link
Member

@rbuckton it looks like Promise.all and Promise.race already take an iterable, so I'm going to check those off.

interface PromiseConstructor {
    // ...

    /**
     * Creates a Promise that is resolved with an array of results when all of the provided Promises 
     * resolve, or rejected when any Promise is rejected.
     * @param values An array of Promises.
     * @returns A new Promise.
     */
    all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;

    /**
     * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved 
     * or rejected.
     * @param values An array of Promises.
     * @returns A new Promise.
     */
    race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;

    // ...
}

@mhegazy mhegazy assigned yuit and unassigned DanielRosenwasser May 4, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.1, Future Sep 29, 2016
@borekb
Copy link

borekb commented Nov 2, 2016

Another one missing: Array.prototype.includes (22.1.3.11).

@mhegazy
Copy link
Contributor

mhegazy commented Nov 2, 2016

Another one missing: Array.prototype.includes (22.1.3.11).

This is not part of ES6, this is actually part of ES7/ES2016. the definition can be included using --lib es2016

@borekb
Copy link

borekb commented Nov 2, 2016

Oh I see, thanks for the pointer!

@DanielRosenwasser DanielRosenwasser added Help Wanted You can do this Good First Issue Well scoped, documented and has the green light labels Aug 3, 2017
NaridaL added a commit to NaridaL/TypeScript that referenced this issue Sep 21, 2017
…r, ArrayBufferConstructor.

Fix Symbol.species in RegExpConstructor and PromiseConstructor.

See microsoft#2881 .
mhegazy pushed a commit that referenced this issue Nov 9, 2017
…r, ArrayBufferConstructor. (#18652)

Fix Symbol.species in RegExpConstructor and PromiseConstructor.

See #2881 .
@mhegazy
Copy link
Contributor

mhegazy commented Nov 9, 2017

Fixed by #18652

@mhegazy mhegazy closed this as completed Nov 9, 2017
@mhegazy mhegazy modified the milestones: Future, TypeScript 2.7 Nov 9, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Nov 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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 ES6 Relates to the ES6 Spec Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

6 participants