@znemz/types
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@znemz/types

ModifiedType

interface OriginalType {
  a: string;
  b: boolean;
  c: number;
}

type ModifiedType = Modify<
  OriginalType,
  {
    a: number;
    b: number;
  }
>;

// ModifiedType = { a: number; b: number; c: number; }

cast

Syntax sugar to force a type casting to unknown and then to desired type.

  type A;
  type B;

  const b:B = ....
  const bIsNowA = cast<A>(b);

External modules

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i @znemz/types

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    3.64 kB

    Total Files

    6

    Last publish

    Collaborators

    • stevenheinrich
    • nmccready