diff --git a/.changeset/big-impalas-wink.md b/.changeset/big-impalas-wink.md new file mode 100644 index 0000000..4f5c18c --- /dev/null +++ b/.changeset/big-impalas-wink.md @@ -0,0 +1,5 @@ +--- +"@naverpay/nurl": patch +--- + +[사용하는 값만 받도록 생성자 파라미터 타입 변경](https://github.com/NaverPayDev/nurl/pull/37) diff --git a/src/nurl.ts b/src/nurl.ts index fc72c28..c9d1baa 100644 --- a/src/nurl.ts +++ b/src/nurl.ts @@ -16,7 +16,22 @@ import { refineQueryWithPathname, } from './utils' -interface URLOptions extends Partial { +interface URLOptions + extends Partial< + Pick< + URL, + | 'href' + | 'protocol' + | 'host' + | 'hostname' + | 'port' + | 'pathname' + | 'search' + | 'hash' + | 'username' + | 'password' + > + > { baseUrl?: string query?: Record }