From 294b40b37a49e6e795be0918871298da25942e80 Mon Sep 17 00:00:00 2001 From: "Raschid J.F. Rafeally" Date: Mon, 6 Jan 2020 15:50:41 -0600 Subject: [PATCH] fix(parse/query): missing base attributes in doesNotMatchKeyInQuery() (#41391) * fix(parse/query): add type of base attributes in doesNotMatchKeyInQuery() * lint(parse): apply lint changes --- types/parse/index.d.ts | 4 +++- types/parse/parse-tests.ts | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index b726ba00aa..1b4f2bc8c5 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -598,7 +598,9 @@ namespace Parse { count(options?: Query.CountOptions): Promise; descending(key: K | K[]): this; doesNotExist(key: K): this; - doesNotMatchKeyInQuery>(key: K, queryKey: X, query: Query): this; + doesNotMatchKeyInQuery>(key: K, queryKey: X, query: Query): this; doesNotMatchQuery(key: K, query: Query): this; distinct(key: K): Promise; each(callback: Function, options?: Query.EachOptions): Promise; diff --git a/types/parse/parse-tests.ts b/types/parse/parse-tests.ts index 363a3d31ca..569486cef6 100644 --- a/types/parse/parse-tests.ts +++ b/types/parse/parse-tests.ts @@ -1219,6 +1219,10 @@ function testQuery() { query.doesNotMatchKeyInQuery('unexistenProp', 'x', new Parse.Query(AnotherSubclass)); // $ExpectError query.doesNotMatchKeyInQuery('attribute1', 'unknownKey', new Parse.Query(AnotherSubclass)); + // $ExpectType Query + query.doesNotMatchKeyInQuery('objectId', 'x', new Parse.Query(AnotherSubclass)); + // $ExpectType Query + query.doesNotMatchKeyInQuery('updatedAt', 'x', new Parse.Query(AnotherSubclass)); // $ExpectType Query query.doesNotMatchQuery('attribute1', new Parse.Query('Example'));