Reputation: 18941
I have two exported functions with the same name (reducer
) in two different files
I can import them like this:
import { * } as appReducer from '../app.reducer';
import { * } as otherReducer from './other.reducer';
and access the function as appReducer.reducer
If I don't wish to import everything with *, why cant i do:
import { reducer } as appReducer from './app.reducer';
Possible some other way?
Upvotes: 1
Views: 60
Reputation: 164139
It should be:
import { reducer as appReducer } from './app.reducer';
As shown in the docs about importing.
Upvotes: 2