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

wire adapter typescript def is incorrect #149

Closed
kevinv11n opened this issue Mar 14, 2018 · 7 comments
Closed

wire adapter typescript def is incorrect #149

kevinv11n opened this issue Mar 14, 2018 · 7 comments

Comments

@kevinv11n
Copy link
Contributor

Description

In https://github.com/salesforce/lwc/blob/master/packages/lwc-engine/types/engine.d.ts#L75 we define wire like this:

export function wire(adapterId: string, adapterConfig: Object): void;

This is not correct. It needs to be defined as a property and method decorator.

As a comparison, see how track is defined:

export const track: PropertyDecorator;

Steps to Reproduce

  1. Open the mono repo in VS Code
  2. Open single-wire.js
@kevinv11n
Copy link
Contributor Author

@caridy You mentioned there were other gaps in engine.d.ts. Can we merge this with that issue or repurpose this to cover it all?

@caridy
Copy link
Contributor

caridy commented Mar 30, 2018

The idea is to eliminate engine.d.ts as a manual file, and produce one as part of the build process. @rsalvador and I decided to keep this around because it was easier, but right after the next cut, we should remove that.

The concern is mostly that a generated file will contain everything, while devs will only have access to some things, other are meant to be used for other tools (e.g.: Aura), and we haven't found an easy way to have that split in the types as well.

@rsalvador
Copy link
Contributor

For the lwc-language-service we will also need an updated engine.d.ts for 214

@rsalvador
Copy link
Contributor

Here I was adding a missing method: #60
After that I did look a little into how to generate the engine.d.ts automatically but it did look pretty complicated to generate the equivalent of engine.d.ts

@caridy
Copy link
Contributor

caridy commented Jul 5, 2018

Is this still an issue @rsalvador @kevinv11n ?

@rsalvador
Copy link
Contributor

We can close this, the wire def was updated here: a091304

@kevinv11n
Copy link
Contributor Author

Config bag needs to be optional. I'll issue a PR shortly.

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

No branches or pull requests

4 participants