From c888d958dbe25a54c54a5d61eb338af7760b3e1e Mon Sep 17 00:00:00 2001 From: Frank Tan Date: Thu, 28 Dec 2017 17:15:14 -0500 Subject: [PATCH] rsvp: Add [Symbol.toStringTag] This is required for compatibility with `lib.es6.d.ts`. See https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es6.d.ts --- types/rsvp/index.d.ts | 2 ++ types/rsvp/rsvp-tests.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/types/rsvp/index.d.ts b/types/rsvp/index.d.ts index 4e9b8edda9..e32ad96363 100755 --- a/types/rsvp/index.d.ts +++ b/types/rsvp/index.d.ts @@ -122,6 +122,8 @@ declare module 'rsvp' { finally(onFinally?: U | PromiseLike): RSVP.Promise; + readonly [Symbol.toStringTag]: "Promise"; + static all( values: [ Arg, diff --git a/types/rsvp/rsvp-tests.ts b/types/rsvp/rsvp-tests.ts index 7805c40fa5..1f14a3318b 100755 --- a/types/rsvp/rsvp-tests.ts +++ b/types/rsvp/rsvp-tests.ts @@ -324,3 +324,7 @@ function testOnAndOff() { ); }); } + +function testAssignableToPromise() { + const promise: Promise = RSVP.resolve(0); +}