Home / Type/ DecorationMethod Type — fastify Architecture

DecorationMethod Type — fastify Architecture

Architecture documentation for the DecorationMethod type/interface in instance.d.ts from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  21e5f1a3_ae45_fa24_2268_d9236fe8f6a7["DecorationMethod"]
  4e9bf84a_5251_4fe5_a2a2_55aee9ba1a06["instance.d.ts"]
  21e5f1a3_ae45_fa24_2268_d9236fe8f6a7 -->|defined in| 4e9bf84a_5251_4fe5_a2a2_55aee9ba1a06
  style 21e5f1a3_ae45_fa24_2268_d9236fe8f6a7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

types/instance.d.ts lines 98–115

type DecorationMethod<This, Return = This> = {
  <
    // Need to disable "no-use-before-define" to maintain backwards compatibility, as else decorate<Foo> would suddenly mean something new

    T extends (P extends keyof This ? This[P] : unknown),
    P extends string | symbol = string | symbol
  >(property: P,
    value: GetterSetter<This, T extends (...args: any[]) => any
      ? (this: This, ...args: Parameters<T>) => ReturnType<T>
      : T
    >,
    dependencies?: string[]
  ): Return;

  (property: string | symbol): Return;

  (property: string | symbol, value: null | undefined, dependencies: string[]): Return;
}

Defined In

Frequently Asked Questions

What is the DecorationMethod type?
DecorationMethod is a type/interface in the fastify codebase, defined in types/instance.d.ts.
Where is DecorationMethod defined?
DecorationMethod is defined in types/instance.d.ts at line 98.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free