Closed
Description
Bug Report
π Search Terms
order of keyof
return union type
π Version & Regression Information
version
: 4.0.3
β― Playground Link
π» Code
export interface RecallStrategyForm {
target1: string;
target2?: string;
getType: string;
inputId: string;
templateTag: string;
limit: {
quota: string;
sign: string;
num: number;
};
recallWeight: number;
recallOrder: string;
recallBasis: number;
recallMax: number;
dateRange: number[];
isCompletion: boolean;
completionNum: number;
}
export interface RecallStrategyTable {
id: string;
target: string;
rule: string;
basis: string;
weight: string;
order: string;
maxNum: number;
isCompletion: string;
dateRange: string;
}
export interface RecallStrategyDetail {
id: string;
no: number;
itemId: string;
itemName: string;
totalMake: number;
'7Make': number;
'3Make': number;
activeDay: number;
cover: string;
templateType: string;
}
type formKey = keyof RecallStrategyForm
type tableKey = keyof RecallStrategyTable
type detailKey = keyof RecallStrategyDetail
π Actual behavior
We can see that the result order of one is different from the order of the other two, the other two are arranged in the order of declaration, but the middle one is not;
π Expected behavior
I hope the order of return is in accordance with the order of declaration or a fixed way;