framework
framework copied to clipboard
Add Interface
I'm submitting a feature request
- Library Version: Latest major.minor.patch-pre
Please tell us about your environment:
-
Operating System: Win10
-
Node Version: 6.10.2
- NPM Version: 3.10.10
- Aurelia CLI OR JSPM OR Webpack AND Version CLI 0.27.0 | JSPM 0.16.53 | webpack 2.3.3
-
Browser: all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView
-
Language: ESNext
Current behavior: Hi Recently I work on a map base project with dojo and I realize it has interface for its widget(module) input I think that will be great if Aurelia add it too so in top of my module I can say in code what object I expect from user and if user use Aurelia helper in vs code and tools like that it can show suggestion for him and make it easier to use a module without doc it can use in output too on service and even help to implement factory design pattern in future. I'm using. Net core in server side but interface can really help in Client site especially when you design plugin and let your backend programmer create simple form with them
It is not clear what you are asking for.
something like this : @interface('config',{ value:'string', maxAlowed:'number' }); @inject(config) class myWidget{...}
Still not clear, sorry. you want to use Aurelia somewhere and need some interface for it? or you want something in Aurelia to allow you to better use your widget?
something in Aurelia to allow you to better use your widget when we use our own module or widget in a team we need something to read as a document to know how module config and work and what module need as a input because JS is not static and class base to determine a class as a input so we can add interface to do the job
@javadbat Is the purpose to document a component's API?
@EisenbergEffect not only for doc but also to declare default value for config property and IDE auto complete feature
@javadbat, use TypeScript instead of ES when creating Aurelia project - Aurelia has decent TypeScript declaration files that all modern IDEs understand to provide auto complete features and static code analysis for detecting buts at build time
yeah you are right type script do the job but what I mean is something like mobx-state-tree that is pure js but constant