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
namespaceenums{exportconstenumRowFilterType{Includes=1,NotIncludes=2,Between=3,NotBetween=4,BigThan=5,BigAndEqualThan=6,LessThan=7,LessAndEqualThan=8,Equal=9,NotEqual=10}}typeNormalFilterType=enums.RowFilterType.Equal|enums.RowFilterType.NotEqual|enums.RowFilterType.BigThan|enums.RowFilterType.LessThan|enums.RowFilterType.BigAndEqualThan|enums.RowFilterType.LessAndEqualThantypeForm={uid: string,fieldUid?: string,filterType: NormalFilterType,value: {type: 'fixed',value?: number|string,valueType: 'number'|'string'}|{type: 'field',fieldUid?: string}}|{uid: string,fieldUid?: string,filterType: enums.RowFilterType.Between|enums.RowFilterType.NotBetween,left?: number,right?: number}|{uid: string,fieldUid?: string,filterType: enums.RowFilterType.Includes|enums.RowFilterType.NotIncludes,valueType: 'number'|'string',value?: string}constrequired={required: true,message: 'this field is required.'}constform=undefinedasForm|undefinedletrules: Record<string,any>if(form===undefined){rules={}}elseif(form.filterType===enums.RowFilterType.Between||form.filterType===enums.RowFilterType.NotBetween){rules={fieldUid: [required],left: [required],right: [required]}}elseif(form.filterType===enums.RowFilterType.Includes||form.filterType===enums.RowFilterType.NotIncludes){rules={fieldUid: [required],value: [required]}}else{constfilterType=form.filterType// typeof filterType is NormalFilterTypeconstvalue=form.value// here the form should has properties of value, but it's not.}
π Actual behavior
See the line at 66, the type of form should be narrowed in this switch, but it's not.
π Expected behavior
The type of form should be narrowed.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
type narrow
π Version & Regression Information
TypeScript 5.8.3
β― Playground Link
https://www.typescriptlang.org/play/?#code/HYQwtgpgzgDiDGEAEFgFcxSQbwFBIJQA8YB7AJwBcl5TgprUMkAlUgdwDEBLAG0ojkAKgE8YyPISlIAksHi80AE2hIAvEgCMAGnzSCAOVKU5C5ao0AmXfoIAhCJXYRU6pAGYbto5QdOXwG4ALF76dtwA5kIAFiCBGgCsodLhEQCCwEoAogCOaCC8MXFuAGzJUgAy0FBF8UgA7OWEVVBQGdl5BbVuABxNBLn5vG4AnP1IPoMFbpoADHoEAL64y7iUYshG5GAFPPyCouJuTJgAdGxcfALCG6dTwwA+KOhnF3vXhxCnk52PzxhQc4cd4HW6pbpPE6At5XUHiU4tGqxQKQl7Q4Gwm7w1Lte4Q-6vDH7LFfRG4361XBrDZITgUMBuSSENDcJQALiQDHI3GAEWSADNuBBeEoAKqsgD8HK5PL5CyQguJnw5Wx2vBBJOSADcCmgIBymfp1uIOQByQVECBKU3jHWKCBSpAvABGgiQTxlvNtuogyqQppdglN7v9noipvlixDhukxv1-sFwut40TIvFSkdYcjK2j8pZ7M5lG5XvlqbFkulRdlAsxfqhQMuSrBjmcrlRAIbGs+32MflbwGSvAg-MojsD5GS3Ii0VHHPHOaeMfzleLcqkZfTmarJfXtY2HPrMKb8NMihUWHbhMbH1uPlP5ig2p9foDGFd5GDT1NYZt8rteq3VcVipWh6GocgIDybgIKURl5QgqCYI5Is9WSSBWhACJ41NShom4LAyyQfCkAQlkYNOCNllAhgFXpNw0EyYceStJAQCwOlthDBiVEFYArVwIdwLQIcoA5FgIFocglAAHjDbRWOAEQAD4qW4fkkAACn5Oi1F0pBuKYvilAAShweDhIsHBlijYUoGQNTNO07ZTkVG8jl0jRDyJNyvj7AJ3SeJywBcvd3L0rzrzhL4fD81BTJjcgLKwDQY13JN0w5ABtUjoKtABdcYhxHLKcpggr5SkKcZxKyCyPy7MbN4OyiPUrT6RC49kA8gl0UiklTnvc8Ato5zXKi9RwrRTtQui4xBugeLzJEuDbAVIU01ZGrEPy717S2uqlDyhqUCaiR5Wo6gxpJNwgo6nykAAegepA41IdSrs+IisFVXYZvOugaP-LqRuCoHHue6JBGQXDkCCzlolIYTYNiLAYHIUhxCoIUsDepAgfk500GobhKG-J1jFOKlliAA
π» Code
π Actual behavior
See the line at 66, the type of form should be narrowed in this switch, but it's not.
π Expected behavior
The type of form should be narrowed.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: