Skip to main content
Module

x/enzastdlib/collections/class.ts>MethodsOf

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
type alias MethodsOf
import { type MethodsOf } from "https://deno.land/x/enzastdlib@v0.0.4/collections/class.ts";

Returns an Object containing all the methods of a Class.

Examples

Example 1

import type { MethodsOf } from 'https://deno.land/x/enzastdlib/collections/mod.ts';

class MyClass {
    myProperty = false;

    methodOne(): number {
	       return 42;
    }

    methodTwo(): string {
        return "Hello World";
    }
}

type MyMethods = MethodsOf<MyClass>; // `{ methodOne: () => number; methodTwo: () => string; }`
definition: PickValues<Cls, Function>