From 846cdd145fb29afbb75368809b4c3b2f96813957 Mon Sep 17 00:00:00 2001 From: Alec Aivazis Date: Sun, 28 Aug 2022 13:53:25 -0700 Subject: [PATCH] add super calls to all store typedefs --- src/cmd/generators/stores/fragment.ts | 5 ++++- src/cmd/generators/stores/mutation.ts | 5 +++-- src/cmd/generators/stores/query.ts | 5 ++++- src/cmd/generators/stores/subscription.ts | 5 ++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/cmd/generators/stores/fragment.ts b/src/cmd/generators/stores/fragment.ts index 7091359dce..06fd9401e3 100644 --- a/src/cmd/generators/stores/fragment.ts +++ b/src/cmd/generators/stores/fragment.ts @@ -57,7 +57,10 @@ export default ${globalStoreName} const typeDefs = `import type { ${_data}, ${queryClass}, QueryStoreFetchParams} from '$houdini' export declare class ${storeName} extends ${queryClass}<${_data}, {}> { - constructor() {} + constructor() { + // @ts-ignore + super({}) + } } export const ${globalStoreName}: ${storeName} diff --git a/src/cmd/generators/stores/mutation.ts b/src/cmd/generators/stores/mutation.ts index 98c3905923..c9ba2698c8 100644 --- a/src/cmd/generators/stores/mutation.ts +++ b/src/cmd/generators/stores/mutation.ts @@ -37,8 +37,9 @@ export default ${globalStoreName} const typeDefs = `import type { ${_input}, ${_data}, ${_optimistic}, MutationStore } from '$houdini' export declare class ${storeName} extends MutationStore<${_data} | undefined, ${_input}, ${_optimistic}>{ - constructor(...args) { - super(...args) + constructor() { + // @ts-ignore + super({}) } } diff --git a/src/cmd/generators/stores/query.ts b/src/cmd/generators/stores/query.ts index c2f7024533..3f8f7ac394 100644 --- a/src/cmd/generators/stores/query.ts +++ b/src/cmd/generators/stores/query.ts @@ -72,7 +72,10 @@ export default ${globalStoreName} const typeDefs = `import type { ${_input}, ${_data}, ${queryClass}, QueryStoreFetchParams} from '$houdini' export declare class ${storeName} extends ${queryClass}<${_data}, ${_input}> { - constructor() {} + constructor() { + // @ts-ignore + super({}) + } } export const ${globalStoreName}: ${storeName} diff --git a/src/cmd/generators/stores/subscription.ts b/src/cmd/generators/stores/subscription.ts index 721045e476..3730dfee2e 100644 --- a/src/cmd/generators/stores/subscription.ts +++ b/src/cmd/generators/stores/subscription.ts @@ -34,7 +34,10 @@ export default ${globalStoreName} const typeDefs = `import type { ${_input}, ${_data}, SubscriptionStore } from '$houdini' export declare class ${storeName} extends SubscriptionStore<${_data} | undefined, ${_input}> { - constructor() {} + constructor() { + // @ts-ignore + super({}) + } } export const ${globalStoreName}: ${storeName}