Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Forward compatible updates for TS 2.4 #342

Merged
merged 3 commits into from
Jun 27, 2017
Merged

Conversation

kitsonk
Copy link
Member

@kitsonk kitsonk commented Jun 23, 2017

Type: bug / feature

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit or Functional tests are included in the PR

Description:

This PR contains forward compatible updates for TypeScript 2.4

Refs: dojo/meta#189

@kitsonk kitsonk requested review from agubler and rorticus June 23, 2017 15:38
@kitsonk
Copy link
Member Author

kitsonk commented Jun 23, 2017

Hmmm... I think I have configured appveyor to ignore branches that don't have a configuration file for appveyor and should stop these from being marked failed.

const e: Executor<U> = (resolve, reject) => {
function handler(rejected: boolean, valueOrError: T | U | Error) {
const callback: ((value: T | U | Error) => (U | Thenable<U> | void)) | undefined = rejected ? onRejected : onFulfilled;
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2> | void) | undefined | null): ExtensiblePromise<TResult1 | TResult2> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite a long line now.

function handler(rejected: boolean, valueOrError: T | U | Error) {
const callback: ((value: T | U | Error) => (U | Thenable<U> | void)) | undefined = rejected ? onRejected : onFulfilled;
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2> | void) | undefined | null): ExtensiblePromise<TResult1 | TResult2> {
const e: Executor<TResult1> = (resolve, reject) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it was e before but we could probably give it a better name.

Copy link
Member

@agubler agubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of comments, some super nice documentation additions.

@kitsonk kitsonk merged commit 2f429a1 into dojo:master Jun 27, 2017
@dylans dylans added this to the 2017.06 milestone Jul 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants