-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Which packages are impacted by your issue?
@graphprotocol/graph-ts
Describe the issue
I am getting these type errors:
apps/flow/generated/templates.ts:9:14 - error TS2417: Class static side 'typeof ContractFlow' incorrectly extends base class static side 'typeof DataSourceTemplate'.
Types of property 'create' are incompatible.
Type '(address: Address) => void' is not assignable to type '(name: string, params: string[]) => void'.
Types of parameters 'address' and 'name' are incompatible.
Type 'string' is not assignable to type 'Address'.
9 export class ContractFlow extends DataSourceTemplate {
~~~~~~~~~~~~
apps/flow/generated/types/templates.ts:9:14 - error TS2417: Class static side 'typeof ContractFlow' incorrectly extends base class static side 'typeof DataSourceTemplate'.
Types of property 'create' are incompatible.
Type '(address: Address) => void' is not assignable to type '(name: string, params: string[]) => void'.
Types of parameters 'address' and 'name' are incompatible.
Type 'string' is not assignable to type 'Address'.
9 export class ContractFlow extends DataSourceTemplate {
Reproduction
https://github.com/sablier-labs/indexers/tree/main/apps/flow
Steps to Reproduce the Bug or Issue
- Go to https://github.com/sablier-labs/indexers/tree/main/apps/flow
- Install the dependencies with
yarn install
- Run
yarn tsc --noEmit
in theflow
directory
Expected behavior
I shouldn't get these type errors
Screenshots or Videos
No response
Platform
- OS: [email protected]
- NodeJS: v22.13.1
@graphprotocol/graph-ts
: v0.38.0
Subgraph Manifest
No response
Subgraph GraphQL Schema
No response
Additional context
This is the autogenerated file — the issue is with the create
function:
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
import {
Address,
DataSourceTemplate,
DataSourceContext,
} from "@graphprotocol/graph-ts";
export class ContractFlow extends DataSourceTemplate {
static create(address: Address): void {
DataSourceTemplate.create("ContractFlow", [address.toHex()]);
}
static createWithContext(address: Address, context: DataSourceContext): void {
DataSourceTemplate.createWithContext(
"ContractFlow",
[address.toHex()],
context,
);
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working