From 306792cb160f040890a7b0f177f7456c5bfcf539 Mon Sep 17 00:00:00 2001 From: Morten Moeller Date: Sat, 4 May 2024 21:46:01 -0500 Subject: [PATCH] Revert "Fixes Typescript Defs based on CoreManager Changes." This reverts commit 25441f9b280e965c5c150187ec59408b080f2fb1. --- types/ObjectStateMutations.d.ts | 8 ++++---- types/ParseFile.d.ts | 6 +----- types/ParseHooks.d.ts | 2 -- types/ParseQuery.d.ts | 4 ++-- types/ParseUser.d.ts | 2 +- types/Push.d.ts | 2 +- types/tsconfig.json | 2 +- 7 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 types/ParseHooks.d.ts diff --git a/types/ObjectStateMutations.d.ts b/types/ObjectStateMutations.d.ts index a8a4b2e70..c82bd0d6c 100644 --- a/types/ObjectStateMutations.d.ts +++ b/types/ObjectStateMutations.d.ts @@ -8,16 +8,16 @@ export function mergeFirstPendingState(pendingOps: Array): void; export function estimateAttribute(serverData: AttributeMap, pendingOps: Array, className: string, id: string | null, attr: string): mixed; export function estimateAttributes(serverData: AttributeMap, pendingOps: Array, className: string, id: string | null): AttributeMap; export function commitServerChanges(serverData: AttributeMap, objectCache: ObjectCache, changes: AttributeMap): void; -export type AttributeMap = { +type AttributeMap = { [attr: string]: any; }; -export type OpsMap = { +type OpsMap = { [attr: string]: Op; }; -export type ObjectCache = { +type ObjectCache = { [attr: string]: string; }; -export type State = { +type State = { serverData: AttributeMap; pendingOps: OpsMap[]; objectCache: ObjectCache; diff --git a/types/ParseFile.d.ts b/types/ParseFile.d.ts index 232b37faa..704384901 100644 --- a/types/ParseFile.d.ts +++ b/types/ParseFile.d.ts @@ -1,5 +1,5 @@ // @ts-nocheck -export type FileSource = { +type FileSource = { format: "file"; file: Blob; type: string; @@ -179,7 +179,3 @@ type Base64 = { type Uri = { uri: string; }; -export type FileSaveOptions = FullOptions & { - metadata?: { [key: string]: any }, - tags?: { [key: string]: any }, -}; diff --git a/types/ParseHooks.d.ts b/types/ParseHooks.d.ts deleted file mode 100644 index f6cdf332e..000000000 --- a/types/ParseHooks.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type HookDeclaration = { functionName: string, url: string } | { className: string, triggerName: string, url: string }; -export type HookDeleteArg = { functionName: string } | { className: string, triggerName: string }; diff --git a/types/ParseQuery.d.ts b/types/ParseQuery.d.ts index 86033aa1b..60b0bbb5e 100644 --- a/types/ParseQuery.d.ts +++ b/types/ParseQuery.d.ts @@ -2,7 +2,7 @@ type WhereClause = { [attr: string]: mixed; }; -export type QueryJSON = { +type QueryJSON = { where: WhereClause; watch?: string; include?: string; @@ -918,7 +918,7 @@ declare class ParseQuery { cancel(): ParseQuery; _setRequestTask(options: any): void; /** - * Sets a comment to the query so that the query + * Sets a comment to the query so that the query * can be identified when using a the profiler for MongoDB. * * @param {string} value a comment can make your profile data easier to interpret and trace. diff --git a/types/ParseUser.d.ts b/types/ParseUser.d.ts index 89c45d308..5a425bc55 100644 --- a/types/ParseUser.d.ts +++ b/types/ParseUser.d.ts @@ -1,5 +1,5 @@ // @ts-nocheck -export type AuthData = { +type AuthData = { [key: string]: mixed; }; export default ParseUser; diff --git a/types/Push.d.ts b/types/Push.d.ts index 367617fdb..3108e0d24 100644 --- a/types/Push.d.ts +++ b/types/Push.d.ts @@ -49,7 +49,7 @@ export function send(data: PushData, options?: FullOptions): Promise; * @returns {Parse.Object} Status of Push. */ export function getPushStatus(pushStatusId: string, options?: FullOptions): Promise; -export type PushData = { +type PushData = { where?: WhereClause | ParseQuery; push_time?: string | Date; expiration_time?: string | Date; diff --git a/types/tsconfig.json b/types/tsconfig.json index d18d38fbe..2edb2f209 100644 --- a/types/tsconfig.json +++ b/types/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6", "dom"], + "lib": ["es6"], "noImplicitAny": true, "noImplicitThis": true, "strictFunctionTypes": true,