-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Compilation failures under TS 2.6 #823
Comments
Problem is that there isn't a good way to type the result of |
Any idea why you don't get this error when you build? This is just one location affected - I'll send a PR with a temp. fix for all of them, pointing to this issue as the TODO |
Best guess is that it is because our build still uses TS 2.4 and the Bazel rules use TS 2.6. When we upgrade to TS 2.6 we see the same error. |
Oh, I probably had some leakage of module resolution - I did switch the Bazel build to TS 2.4 but it might have still picked up a version from rules_typescript. Need to screw down the module resolution tighter... |
I've upgraded our app from TypeScript 2.5.3 to 2.6.2 (strict mode) and now, there are few issues. export interface RouterStateProjection {
url: string | null;
data: Data;
params: Params;
queryParams: Params;
}
export interface RootState {
routerReducer: RouterReducerState<RouterStateProjection>;
configInitialized: boolean;
}
export const rootReducers: ActionReducerMap<RootState> = {
routerReducer: routerReducer, // this line fails
configInitialized: configInitializedReducer,
}; it results in:
export interface State extends RootState {
campaigns: CampaignState;
}
interface CampaignState {
list: campaignListReducer.CampaignListState;
detail: campaignDetailReducer.CampaignDetailState;
form: campaignFormReducer.CampaignFormState;
transactionList: campaignTransactionListReducer.CampaignTransactionListState;
transactionDetail: transactionDetailReducer.TransactionDetailState;
}
export const campaignReducers: ActionReducerMap<CampaignState> = {
list: campaignListReducer.reducer,
detail: campaignDetailReducer.reducer,
form: campaignFormReducer.reducer,
transactionList: campaignTransactionListReducer.reducer,
transactionDetail: transactionDetailReducer.reducer,
}; export interface CampaignListState {
campaigns: Campaign[];
totalCount: number;
error: any;
listingOptions: ListingOptions;
preloadStatus: StatePreloadStatus;
}
export function reducer(state = initialState, action: CampaignListActions): CampaignListState {
|
I think this is obsolete, TS 2.7 is in the package.json now |
When building with Bazel, I get some errors, eg.
I am not sure why the normal build doesn't have this problem. I am using the same version of TypeScript as in
package.json
, and the roottsconfig.json
settings. I tried runningyarn build
but that fails withFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
- maybe someone on the team can diagnose why you don't see this type-check error. Seems legitimate to me.The text was updated successfully, but these errors were encountered: