diff --git a/types/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts
index 04ad9d5dc2..42054a389e 100644
--- a/types/bluebird-global/index.d.ts
+++ b/types/bluebird-global/index.d.ts
@@ -31,6 +31,22 @@
* in the runtime. Do this by either importing bluebird.js via a `` tag in your html or
* via importing it in your js entry file AND assigning it to the global Promise symbol.
*
+ * c) if you're `--target`ing "es5", then you'll need to include the "es2015.iterable" lib typings to
+ * let the bluebird.d.ts compile (requirement for Map, Iterable & friends). This is only for the
+ * compile-time, since bluebird doesn't require these es6 features to be present in the runtime.
+ * To summarise: when targeting "es5", make sure you have the follwing "lib" config in your tsconfig.json:
+ *
+ * {
+ * "compilerOptions": {
+ * "lib": [
+ * "es5",
+ * "es2015.iterable",
+ * "dom"
+ * (more, if you need...)
+ * ],
+ * }
+ * }
+ *
* 3. Why so much effort?
*
* If a promise-polyfilling library wants to play nicely with TypeScript, it needs to augment
@@ -38,7 +54,7 @@
* For various reasons this couldn't be done in The `bluebird` typings.
*
* 4. Contributors: After changing this file please manually test these cases (via altering ./tsconfig.json ):
- * a. target es5, no `lib` key
+ * a. target es5, with the following `lib` keys: "es5", "es2015.iterable", "dom"
* b. target es6, no `lib` key
* c. target es5, latest "es20xx", e.g. "es2017"
* d. target es6, latest "es20xx", e.g. "es2017"
@@ -128,7 +144,7 @@ declare global {
/*
* See comments above `then` for the reason why this is needed. Taken from esnext.promise.d.ts.
*/
- finally(onfinally?: (() => void) | undefined | null): Bluebird;
+ finally(onfinally?: (() => void) | undefined | null): Promise;
}
/*
diff --git a/types/bluebird-global/tsconfig.json b/types/bluebird-global/tsconfig.json
index d037429e0d..cfea60105c 100644
--- a/types/bluebird-global/tsconfig.json
+++ b/types/bluebird-global/tsconfig.json
@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
- "es2017",
+ "es2018",
"dom"
],
"noImplicitAny": true,