wix-incubator / corvid-types

Type definitions for Corvid by Wix
MIT License
5 stars 3 forks source link

WIP - context declarations #23

Closed nemni8 closed 4 years ago

nemni8 commented 4 years ago

working! include manifest and pageelements map support. tested in both flows, configPath and declarations. Please ignore the dist and types folders, it will be removed from the final commit. i am using it to be able to consume this branch from code code before we published an official version.

agankarin commented 4 years ago

@nemni8 Can you please explain what should be the output after those changes? Would corvid-types create a map for the dts files? would it bundle it to a different file?

About getting the path of both our declaration files and JS dts, while I was reading about the language service API, I read that the compiler provides an API to get the source file list when you compile a program and this list already resolved the path we used whit the reference path=.. tag. I used your compiler function(in test) and the output was: /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es5.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2016.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.core.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.collection.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.generator.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.iterable.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.promise.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.proxy.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.reflect.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.symbol.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2016.array.include.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.object.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.string.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.intl.d.ts [] /users/karinag/projects/corvid-types/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts [] /users/karinag/projects/corvid-types/types/common/emptybuffer.d.ts [] /users/karinag/projects/corvid-types/types/common/void$w$w.d.ts [] /users/karinag/projects/corvid-types/types/common/declaration.d.ts [] /users/karinag/projects/corvid-types/types/public/index.d.ts [ { pos: 21, end: 47, fileName: '../common/emptyBuffer.d.ts' }, { pos: 73, end: 96, fileName: '../common/void$w$w.d.ts' }, { pos: 122, end: 148, fileName: '../common/declaration.d.ts' } ]