-
Notifications
You must be signed in to change notification settings - Fork 94
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
add symbol type to loadToApp function property argument #220
base: master
Are you sure you want to change the base?
add symbol type to loadToApp function property argument #220
Conversation
…rty argument The js implementation of loadToApp function in loader support passing type `symbol` But the typescript declaration file does not support this Add symbol type to loadToApp functon property argument
Codecov Report
@@ Coverage Diff @@
## master #220 +/- ##
=======================================
Coverage 99.80% 99.80%
=======================================
Files 19 19
Lines 1016 1016
=======================================
Hits 1014 1014
Misses 2 2
Continue to review full report at Codecov.
|
when could we load to a symbol? |
You can not do this in |
my question is why will we call |
I would suggest you ask the person who write the code in JS. If the type of argument is supported by |
sorry, could you show me the link for the js code that you just mentioned? |
Please check: egg-core/lib/loader/egg_loader.js Line 379 in 77e11f5
And here: https://eggjs.org/zh-cn/advanced/framework.html#%E8%87%AA%E5%AE%9A%E4%B9%89-loader The property is a key in a js map, and can be |
and we don't find the scenario to loadToApp with some Symbol, so I think it should not add to typings. |
Checklist
npm test
passesAffected core subsystem(s)
loader
Description of change
Add
symbol
type to the property argument ofloadToApp
function.The js implementation supports this type of argument, but the typescript declaration does not support this, currently we can not pass
symbol
variable to be the property argument ofloadToApp
. As we use typescript heavily, we want to enable this type of argument.