Skip to content
Permalink
Browse files

switch overload signature for better tooling

  • Loading branch information...
Braden Snell Braden Snell
Braden Snell authored and Braden Snell committed Apr 6, 2019
1 parent 1161fad commit 602e627d4c8f78e43285de4d7d40ed9e5be4e850
Showing with 5 additions and 4 deletions.
  1. +2 −1 .vscode/settings.json
  2. +1 −1 package-lock.json
  3. +1 −1 package.json
  4. +1 −1 src/defineRoute.ts
@@ -9,5 +9,6 @@
"node_modules": true,
".cache": true,
"dist": true
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}

Some generated files are not rendered by default. Learn more.

@@ -1,6 +1,6 @@
{
"name": "type-route",
"version": "0.1.8",
"version": "0.1.9",
"main": "./lib/index",
"description": "Flexible Routing + Seamless DX = 🚀",
"repository": {
@@ -5,11 +5,11 @@ import {
} from "./types";
import { validate } from "./validate";

export function defineRoute(path: string): RouteDefinitionData<{}>;
export function defineRoute<T extends ParameterDefinitionCollection>(
params: T,
path: PathFn<T>
): RouteDefinitionData<T>;
export function defineRoute(path: string): RouteDefinitionData<{}>;
export function defineRoute(...args: any[]) {
validate["defineRoute"](Array.from(arguments));

0 comments on commit 602e627

Please sign in to comment.
You can’t perform that action at this time.