Skip to content

Commit 467b8b0

Browse files
committed
Add unmodified Bluebird (and Node) typings as example to poelstra3 and poelstra3poc.
1 parent cd3f4ac commit 467b8b0

File tree

23 files changed

+4457
-13
lines changed

23 files changed

+4457
-13
lines changed

poelstra3/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
This tree shows an example of having two 'native' Typescript packages, that both use a different version of the same non-TS package.
22

3+
To make the example even more interesting, both 'wrapped' (`declare module "..." { }`) and unwrapped typings are used.
4+
In `myotherlib`, `myutils` is still unwrapped, but Bluebird and node were added as wrapped examples (directly taken from DefinitelyTyped).
5+
36
This version was copied from `poelstra2`, with the following changes:
47
* `myutils` was changed to look like a 'plain' JS package, without TS code nor typings
58
* `mylib` and `myotherlib` both include typings for their version of `myutils`, which differ

poelstra3/dist/myprogram.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ var mylib = require("mylib");
22
var myotherlib = require('myotherlib');
33
var a = mylib.myfunc();
44
var b = myotherlib.myotherfunc();
5+
console.log(typeof a.foo);
6+
console.log(typeof b.foo);
7+
myotherlib.bleh().then(function (x) {
8+
console.log(x.foo);
9+
});

poelstra3/node_modules/mylib/package.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poelstra3/node_modules/myotherlib/dist/index.d.ts

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poelstra3/node_modules/myotherlib/dist/index.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poelstra3/node_modules/myotherlib/package.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poelstra3/node_modules/myotherlib/ts/index.ts

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)