Skip to content

removed redeclarations so it works with ten-A/Types-for-Adobe #20

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbrown345
Copy link

No description provided.

@sbrown345 sbrown345 mentioned this pull request Jan 5, 2020
Copy link
Member

@ff6347 ff6347 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. The files *.d.ts are the source for index.d.ts. They all get concatenated using bin/concat.js in the build process. So removing them makes no sense. I guess it would be better if we add them to a .npmignore file so we don't get a redeclaration.

@sbrown345
Copy link
Author

I'm only referencing index.d.ts in my project. (Actually just with // <reference path="../node_modules..." /> I guess I can improve on my setup)

I meant they are redeclarations of here: https://github.com/ten-A/Types-for-Adobe/blob/master/shared/JavaScript.d.ts#L299

e.g. declare const Array: ArrayConstructor

I'm using the "noLib" TypeScript configuration so I'm relying on the Types-for-Adobe for the rest. (I can't see any other way of doing it.)

@ff6347
Copy link
Member

ff6347 commented Jan 7, 2020

they are redeclarations of here: ten-A/Types-for-Adobe:shared/JavaScript.d.ts@master#L299

Ah okay. I think it makes no sense to remove them here in just for not having them collide with another repo. I guess others are not using ten-A's "Types-for-Adobe".

Maybe something like this can help you keep a sane setup --> https://www.npmjs.com/package/patch-package

@sbrown345
Copy link
Author

Understood, everyone has a different setup.

I'll give that a shot, thanks!

I got the idea doing it this way just because I was using extendscript-es5-shim-ts at one point, then I noticed the latest commits on this repo, but it wouldn't build. Removing the re-declarations fixed it like on: (Which only declares JSON)
https://github.com/adobe-extension-tools/extendscript-es5-shim-ts/blob/master/index.d.ts

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants