diff --git a/.changeset/rare-planes-stare.md b/.changeset/rare-planes-stare.md new file mode 100644 index 0000000..fc01c79 --- /dev/null +++ b/.changeset/rare-planes-stare.md @@ -0,0 +1,5 @@ +--- +'dataloader': patch +--- + +Added missing type definition for Dataloader.name diff --git a/src/index.d.ts b/src/index.d.ts index 9749228..136ad88 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -59,6 +59,14 @@ declare class DataLoader { * change is made. Returns itself for method chaining. */ prime(key: K, value: V | PromiseLike | Error): this; + + + /** + * The name given to this `DataLoader` instance. Useful for APM tools. + * + * Is `null` if not set in the constructor. + */ + name: string | null; } declare namespace DataLoader {