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

No autocomplete on my objects #1040

Open
Lcfvs opened this issue Nov 22, 2020 · 2 comments
Open

No autocomplete on my objects #1040

Lcfvs opened this issue Nov 22, 2020 · 2 comments

Comments

@Lcfvs
Copy link

Lcfvs commented Nov 22, 2020

Hi,

Sorry for my too generic title but I think this issue can help to find interesting things to improve your incredible tool.

I made some tests on it, it works fine but not with the object created with my low-level component @etchedjs/etched (for sure, my lib is a few conceptual and complex but it's a valid JS).

Version: 0.24.1 (browser demo)

Reproducing steps

Create a etched.js file containing the @etchedjs/etched source

In the main script

import { etch, model } from './etched.js'

const entity = model(null, {
  set id (value) {}
})

const account = model(entity, {
  set name (value) {}
})

const jack = etch(account, {
  id: 123,
  name: 'Jack'
})

const renamed = etch(jack, {
  name: 'Jack-Renamed'
})

jack. // doesn't autocompletes anything

Hope it helps. :)

If you need more informations, just ask.

@othree
Copy link
Collaborator

othree commented Dec 24, 2020

Based on the sample you provided above. I think this is because the limitation of tern. Tern is static analysis tool so it can't do everything like a runtime.

@Lcfvs
Copy link
Author

Lcfvs commented Dec 26, 2020

It's a few unfortunate... I hope to see it going further in futures versions 😛

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

No branches or pull requests

2 participants