[types] Ensure we export symbols that are appropriately types, values or both
See original GitHub issueWhich package(s) does this problem pertain to?
- @types/ember
- @types/ember__string
- @types/ember__polyfills
- @types/ember__object
- @types/ember__utils
- @types/ember__array
- @types/ember__engine
- @types/ember__debug
- @types/ember__runloop
- @types/ember__error
- @types/ember__controller
- @types/ember__component
- @types/ember__routing
- @types/ember__application
- @types/ember__test
- @types/ember__service
- @types/ember-data
- @types/rsvp
- @types/ember-test-helpers
- @types/ember-testing-helpers
- Other
- I don’t know
What are instructions we can follow to reproduce the issue?
example repro case: I want to acquire a type that represents an instance of the ember-data store.
Today I have to do something like
type Store = InstanceType<typeof Store>;
This is because Store
represented as only a value. Passing it through the InstanceOf<typeof x>
effectively converts the value to a factory type, and then gets the instance produced by the factory.
Now about that bug. What did you expect to see?
All services, etc… should behave just like native classes. No type query or instanceof should be required for use
CC: @runspired
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:19 (19 by maintainers)
Top Results From Across the Web
D112735 export unique symbol list with llvm-nm new option
print out the unique and sorted export symbols (print the symbol name and visibility). there are two new options are add in the...
Read more >21. Programming in the Large: Packages and Symbols
The kind of programming that relies on a symbol data type is called, appropriately enough, symbolic computation. It's typically contrasted to numeric ...
Read more >Creating custom symbol images for your app - Apple Developer
Distribute your custom symbol There are two options to consider when distributing a symbol. Choose File > Export Symbol to begin. At the...
Read more >17.2 Controlling the Exported Symbols of Shared Libraries
17.2 Controlling the Exported Symbols of Shared Libraries. The lib-symbol-visibility module allows precise control of the symbols exported by a shared ...
Read more >How to hide the exported symbols name within a shared library
In Windows, you can export a function by only place a integer ID (the ordinal) with an empty name. To show it, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since this has been in the way of ember-data’s TypeScript conversion and my team is sort of held up (or having to take on tech debt) until this is fixed, I’ll take the time to write this up and circulate it amongst typed-ember core.
We should then ensure that PRs opened against
@types/{rsvp,ember*,qunit}
align with these conventionsAgreed on all counts. I think a page in the docs that’s maybe some combination of “specific guidelines for updating
@types/ember*
” + “general guide for writing type declarations” would be super useful as a resource.