Open unional opened 8 years ago
The module version is at the root: /iscroll.d.ts and /typings.json
/iscroll.d.ts
/typings.json
Now we want to use the hack to create the global/script version.
Two files are created:
/global/iscroll/iscroll.d.ts
class IScroll
namespace IScroll
/global/iscroll/iscrollAugment.d.ts
So now the question is what should /global/iscroll/typings.json looks like so that:
/global/iscroll/typings.json
typings/registry/global/iscroll.json
typings install -A iscroll
// typings.json { "name": "iscroll", "main": "iscroll.d.ts", "ambient": true, "files": [ "iscroll.d.ts", "iscrollAugment.d.ts" ], "version": "5.1.3", "homepage": "https://github.com/cubiq/iscroll", "devDependencies": { "blue-tape": "registry:npm/blue-tape#0.1.0+20160322235613" }, "ambientDevDependencies": { "node": "registry:dt/node#4.0.0+20160319033040" } }
Doesn't work because mixing iscroll.d.ts (global/script) and iscrollAugment.d.ts (module) doesn't work.
iscroll.d.ts
iscrollAugment.d.ts
UMD should release within two months (for sure) :rose:
I just want to start using it today! :smirk:
The module version is at the root:
/iscroll.d.ts
and/typings.json
Now we want to use the hack to create the global/script version.
Two files are created:
/global/iscroll/iscroll.d.ts
declares the initial global types:class IScroll
andnamespace IScroll
/global/iscroll/iscrollAugment.d.ts
do global augmentation to add fields from the module version.So now the question is what should
/global/iscroll/typings.json
looks like so that:typings/registry/global/iscroll.json
typings install -A iscroll
Doesn't work because mixing
iscroll.d.ts
(global/script) andiscrollAugment.d.ts
(module) doesn't work.