Skip to content

procxy / GetProcxyMethods

Type Alias: GetProcxyMethods<P>

ts
type GetProcxyMethods<P> = P extends Procxy<any, any, any> ? Exclude<keyof P, symbol | `$${string}`> : never;

Defined in: src/types/isomorphism.ts:233

Extract the union of user-defined method names available on a Procxy type.

Type Parameters

Type ParameterDescription
PA Procxy type

Remarks

Excludes all $-prefixed lifecycle members and symbol keys. Returns never for non-Procxy types. Useful for generic utilities that need to enumerate callable methods on any proxy.

Example

typescript
import type { GetProcxyMethods, Procxy } from 'procxy';

class Calculator {
  add(a: number, b: number): number { return a + b; }
}

type Methods = GetProcxyMethods<Procxy<Calculator>>; // 'add'

Released under the MIT License.