[@ember/routing] private namespacing
See original GitHub issueCross post from https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37323
Which package(s) does this problem pertain to?
What are instructions we can follow to reproduce the issue?
ember new sample; cd ./sample # Create a new ember app
ember install ember-cli-typescript # Set up typescript support
Try to add types for the beforeModel
hook in a route with the transition
argument
beforeModel(this: EditRoute, transition: Transition)
Observe that the transition
types are imported from:
import Transition from '@ember/routing/-private/transition'
Can this be exported in a public space since this is a public API?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (11 by maintainers)
Top Results From Across the Web
EmberRouter - 4.9 - Ember API Documentation
Defines the properties that will be concatenated from the superclass (instead of overridden). By default, when you extend an Ember class a property...
Read more >Ember.AutoLocation
PRIVATE. Defined in: packages/ember-routing/lib/location/auto_location.js:25. Module: ember-routing. Ember.AutoLocation will select the best location option ...
Read more >How to use the ember-runtime/system/object.extend function ...
It uses the unknownProperty handler to automatically create EachArray instances for property names. @private @class EachProxy @namespace Ember @extends Ember.
Read more >Ember routing and applicationController used in connectOutlet
I have this working example fiddle of ember routing ... use several application namespaces (You just have to avoid nesting them in the...
Read more >create-private-dns-namespace - AWS Documentation
Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme....
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
Thanks for filing this! Since its existence and methods are public API, I agree that the interface should be importable. We want to make sure that only an interface is importable so that the types represent the design of the actual type, which is that it is not available to import as a class and is therefore not open for arbitrary extension e.g. via sub-classing.
Any objections to exporting under those terms @jamescdavis @dfreeman @mike-north?
This is sensibly the same thing but check out the documentation: https://docs.ember-cli-typescript.com/ember/routes
Basically, both recommend to reuse what is returned by public methods. That way you can’t be wrong since you get exactly what it is used internally: