TypeScript/tests/cases/conformance/expressions/typeGuards
Nathan Shively-Sanders b36c8a0690
Make anyArray.filter(Boolean) return any[], not unknown[] (#31515)
* Add this-parameter workaround to Array.filter

Allows anys.filter(Boolean) to once again return any[], not unknown[].

* Add any constraint to Boolean factory function

I want to test how well this works.

* Remove Boolean factory type guard

* Remove typeGuardBoolean test
2019-05-22 09:45:41 -07:00
..
nullOrUndefinedTypeGuardIsOrderIndependent.ts
typeGuardEnums.ts
typeGuardFunction.ts
typeGuardFunctionErrors.ts Added tests 2017-07-20 02:59:33 +03:00
typeGuardFunctionGenerics.ts
typeGuardFunctionOfFormThis.ts
typeGuardFunctionOfFormThisErrors.ts
typeGuardInClass.ts
typeGuardIntersectionTypes.ts
typeGuardNarrowsPrimitiveIntersection.ts
typeGuardNarrowsToLiteralType.ts
typeGuardNarrowsToLiteralTypeUnion.ts
typeGuardNesting.ts
typeGuardOfFormExpr1AndExpr2.ts
typeGuardOfFormExpr1OrExpr2.ts
typeGuardOfFormFunctionEquality.ts
typeGuardOfFormInstanceOf.ts
typeGuardOfFormInstanceOfOnInterface.ts
typeGuardOfFormIsType.ts
typeGuardOfFormIsTypeOnInterfaces.ts
typeGuardOfFormNotExpr.ts
typeGuardOfFormThisMember.ts
typeGuardOfFormThisMemberErrors.ts
typeGuardOfFormTypeOfBoolean.ts
typeGuardOfFormTypeOfEqualEqualHasNoEffect.ts
typeGuardOfFormTypeOfFunction.ts Add tests 2018-06-02 17:43:37 -07:00
typeGuardOfFormTypeOfIsOrderIndependent.ts
typeGuardOfFormTypeOfNotEqualHasNoEffect.ts
typeGuardOfFormTypeOfNumber.ts
typeGuardOfFormTypeOfOther.ts Add typeof test case and update baselines 2017-01-31 10:28:32 -08:00
typeGuardOfFormTypeOfPrimitiveSubtype.ts
typeGuardOfFormTypeOfString.ts
typeGuardOfFromPropNameInUnionType.ts Test:in doesn't narrow types with string indexers 2017-12-07 10:56:33 -08:00
typeGuardRedundancy.ts
typeGuardsDefeat.ts
typeGuardsInClassAccessors.ts
typeGuardsInClassMethods.ts
typeGuardsInConditionalExpression.ts
typeGuardsInDoStatement.ts
typeGuardsInExternalModule.ts
typeGuardsInForStatement.ts
typeGuardsInFunction.ts
typeGuardsInFunctionAndModuleBlock.ts
typeGuardsInGlobal.ts
typeGuardsInIfStatement.ts
typeGuardsInModule.ts
typeGuardsInProperties.ts
typeGuardsInRightOperandOfAndAndOperator.ts
typeGuardsInRightOperandOfOrOrOperator.ts
typeGuardsInWhileStatement.ts
typeGuardsObjectMethods.ts
typeGuardsOnClassProperty.ts
typeGuardsWithAny.ts
typeGuardsWithInstanceOf.ts
typeGuardsWithInstanceOfByConstructorSignature.ts [Transforms] Merge master 08/09 (#10263) 2016-08-26 15:51:10 -07:00
typeGuardTautologicalConsistiency.ts
typeGuardTypeOfUndefined.ts
TypeGuardWithArrayUnion.ts
TypeGuardWithEnumUnion.ts
typePredicateASI.ts
typePredicateOnVariableDeclaration01.ts
typePredicateOnVariableDeclaration02.ts