mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
fix(parse/query): missing base attributes in doesNotMatchKeyInQuery() (#41391)
* fix(parse/query): add type of base attributes in doesNotMatchKeyInQuery() * lint(parse): apply lint changes
This commit is contained in:
committed by
Armando Aguirre
parent
2072c9c2c3
commit
294b40b37a
4
types/parse/index.d.ts
vendored
4
types/parse/index.d.ts
vendored
@@ -598,7 +598,9 @@ namespace Parse {
|
||||
count(options?: Query.CountOptions): Promise<number>;
|
||||
descending<K extends (keyof T['attributes'] | keyof BaseAttributes)>(key: K | K[]): this;
|
||||
doesNotExist<K extends (keyof T['attributes'] | keyof BaseAttributes)>(key: K): this;
|
||||
doesNotMatchKeyInQuery<U extends Object, K extends keyof T['attributes'], X extends Extract<keyof U['attributes'], string>>(key: K, queryKey: X, query: Query<U>): this;
|
||||
doesNotMatchKeyInQuery<U extends Object,
|
||||
K extends (keyof T['attributes'] | keyof BaseAttributes),
|
||||
X extends Extract<keyof U['attributes'], string>>(key: K, queryKey: X, query: Query<U>): this;
|
||||
doesNotMatchQuery<U extends Object, K extends keyof T['attributes']>(key: K, query: Query<U>): this;
|
||||
distinct<K extends keyof T['attributes'], V = T['attributes'][K]>(key: K): Promise<V>;
|
||||
each(callback: Function, options?: Query.EachOptions): Promise<void>;
|
||||
|
||||
@@ -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<MySubClass>
|
||||
query.doesNotMatchKeyInQuery('objectId', 'x', new Parse.Query(AnotherSubclass));
|
||||
// $ExpectType Query<MySubClass>
|
||||
query.doesNotMatchKeyInQuery('updatedAt', 'x', new Parse.Query(AnotherSubclass));
|
||||
|
||||
// $ExpectType Query<MySubClass>
|
||||
query.doesNotMatchQuery('attribute1', new Parse.Query('Example'));
|
||||
|
||||
Reference in New Issue
Block a user