Gleam - v1.0.2
    Preparing search index...

    Type Alias Method<T, K>

    Method: T[K] extends (...args: infer A) => infer R
        ? (this: T, ...args: A) => R
        : never

    Conditional helper used by defineMethod: given T[K] is a function, produces a corresponding function type with this: T bound to the prototype owner. Non-function members resolve to never so prototype patches can't target accessors or fields by mistake.

    Type Parameters

    • T
    • K extends keyof T