Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@screenplaydev/retyped-routes

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@screenplaydev/retyped-routes

## About

latest
Source
npmnpm
Version
0.3.1
Version published
Maintainers
3
Created
Source

Retyped routes (beta)

About

Retyped routes provides a type-safe way to create API definitions with retype in a way that can be read both by the server and client.

Install

yarn add @screenplaydev/retyped-routes

Usage

import * as t from "@screenplaydev/retype";
import { asRouteTree } from "@screenplaydev/retyped-routes";

const API_ROUTES = asRouteTree({
  login: {
    method: "POST",
    url: "/auth",
    params: {
      email: t.string,
      password: t.string,
    },
    response: {
      token: t.string,
    },
  },
} as const);

export default API_ROUTES;

License

Copyright 2021, Screenplay Studios Inc.

FAQs

Package last updated on 20 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts