Skip to content

Commit

Permalink
Add unmodified Bluebird (and Node) typings as example to poelstra3 an…
Browse files Browse the repository at this point in the history
…d poelstra3poc.
  • Loading branch information
poelstra committed Apr 22, 2015
1 parent cd3f4ac commit 467b8b0
Show file tree
Hide file tree
Showing 23 changed files with 4,457 additions and 13 deletions.
3 changes: 3 additions & 0 deletions poelstra3/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
This tree shows an example of having two 'native' Typescript packages, that both use a different version of the same non-TS package.

To make the example even more interesting, both 'wrapped' (`declare module "..." { }`) and unwrapped typings are used.
In `myotherlib`, `myutils` is still unwrapped, but Bluebird and node were added as wrapped examples (directly taken from DefinitelyTyped).

This version was copied from `poelstra2`, with the following changes:
* `myutils` was changed to look like a 'plain' JS package, without TS code nor typings
* `mylib` and `myotherlib` both include typings for their version of `myutils`, which differ
Expand Down
5 changes: 5 additions & 0 deletions poelstra3/dist/myprogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ var mylib = require("mylib");
var myotherlib = require('myotherlib');
var a = mylib.myfunc();
var b = myotherlib.myotherfunc();
console.log(typeof a.foo);
console.log(typeof b.foo);
myotherlib.bleh().then(function (x) {
console.log(x.foo);
});
3 changes: 1 addition & 2 deletions poelstra3/node_modules/mylib/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion poelstra3/node_modules/myotherlib/dist/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions poelstra3/node_modules/myotherlib/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions poelstra3/node_modules/myotherlib/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions poelstra3/node_modules/myotherlib/ts/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 467b8b0

Please sign in to comment.