diff --git a/index.d.ts b/index.d.ts index 81df9958..133dab7b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -154,6 +154,7 @@ declare namespace Router { reset(): void; prettyPrint(): string; + prettyPrint(opts: { commonPrefix?: boolean }): string; all: ShortHandRoute; diff --git a/test/types/router.test-d.ts b/test/types/router.test-d.ts index 0c1f79f8..3d7a5500 100644 --- a/test/types/router.test-d.ts +++ b/test/types/router.test-d.ts @@ -58,6 +58,8 @@ let http2Res!: Http2ServerResponse; expectType(router.reset()) expectType(router.prettyPrint()) + expectType(router.prettyPrint({ commonPrefix: false })) + expectType(router.prettyPrint({ commonPrefix: true })) } // HTTP2