Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Need to add type definitions to npm package so we can create external rule/connector #432

Closed
sarvaje opened this issue Aug 17, 2017 · 4 comments
Assignees

Comments

@sarvaje
Copy link
Contributor

sarvaje commented Aug 17, 2017

If we try to create an external rule/connector, we don't have the type definitions, so typescript notifies some errors when they are not.

For example, if we try to create a new Launcher for a connector, I have to do something like:
export class NewLauncher exports Launcher

Launcher has a protected property port, but if I try to use that property inside NewLauncher I get a typescript error error TS2339: Property 'port' does not exist on type 'NewLauncher'.

@molant molant changed the title Needs of type definitions when create an external rule/connector Need to add type definitions to npm package so we can create external rule/connector Aug 17, 2017
@molant
Copy link
Member

molant commented Aug 17, 2017

@sarvaje what are the folders that should be added to the npm package?

@sarvaje
Copy link
Contributor Author

sarvaje commented Aug 18, 2017

I'm not sure, in packages like @types/whatever what they have are files with extension .d.ts so maybe is something we need to do manually or something, But I'm not sure.

@molant
Copy link
Member

molant commented Aug 18, 2017

I think that just the .ts files should be enough in our case, no need for .d.ts.
Also we can look into https://github.com/Microsoft/dts-gen to generate a starting point for the ones we need.

sarvaje added a commit to sarvaje/hint that referenced this issue Aug 22, 2017
sarvaje added a commit to sarvaje/hint that referenced this issue Aug 22, 2017
molant pushed a commit that referenced this issue Aug 23, 2017
@molant
Copy link
Member

molant commented Aug 23, 2017

Anything in the dist folder will get published. Nothing to do here.

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

Successfully merging a pull request may close this issue.

3 participants