I would like to rename the functions that I am exporting using the following syntax.
export const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors(selectState);
So that I can import selectAll as selectAllThings into other files.
Is this possible with Typescript/Javascript?
yes you can set alias on import stage:
import { selectAll as selectAllThings } from 'path_to_file';
or you can set alias on descructurization stage:
export const { selectAll: selectAllThings } = adapter.getSelectors(selectState);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With