You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot define a module for a specific file extension in 2.4.1 #16769
// A *self-contained* demonstration of the problem follows...declare module "*.vue"{importVuefrom'vue'exportdefaulttypeofVue}
Expected behavior:
A file with the above content used to work when importing .vue files.
In 2.4.1 It looks like the file is not taken into account as every .vue file gets imported as "string"? Actual behavior:
Everything seems to be imported as string?
The right hand side of an export default is an expression not a type. typeof Vue is just calling the regular JS typeof operator on the reference Vue; and that happens to be a string all the time..
This should have been an error to have an expression in an ambient context. the only possible value should be an identifier name. files #17991 to track it.
so for this definition, you need to change your declaration to be:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
vekexasia commentedon Jun 27, 2017
That file is perfectly working in
2.3.4mhegazy commentedon Aug 23, 2017
The right hand side of an
export defaultis an expression not a type.typeof Vueis just calling the regular JStypeofoperator on the referenceVue; and that happens to be astringall the time..This should have been an error to have an expression in an ambient context. the only possible value should be an identifier name. files #17991 to track it.
so for this definition, you need to change your declaration to be:
mhegazy commentedon Sep 7, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.