From d46b8903fc9e2be6968112f3b237ca11bd1e22e2 Mon Sep 17 00:00:00 2001 From: Retsam Date: Fri, 22 Jun 2018 13:00:19 -0400 Subject: [PATCH] Use to indicate a type error --- types/knockout/test/templatingBehaviors.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/knockout/test/templatingBehaviors.ts b/types/knockout/test/templatingBehaviors.ts index 8d47b4551d..bf87b784da 100644 --- a/types/knockout/test/templatingBehaviors.ts +++ b/types/knockout/test/templatingBehaviors.ts @@ -575,7 +575,8 @@ describe('Templating', function() { // Now set the observable to null and check it's treated like an empty array // (because how else should null be interpreted?) - myArray(null as any); // DefinitelyTyped note: while KO accepts this, I wouldn't consider it a well-typed usage of the API + // DefinitelyTyped note: while KO accepts this, I wouldn't consider it a well-typed usage of the API + myArray(null); // $ExpectError expect(testNode.childNodes[0].childNodes.length).toEqual(0); });