Skip to content

Commit

Permalink
type: fix type error. #5
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 28, 2023
1 parent 5089c85 commit fb2792d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function localIpUrl(name?: 'public' | 'private', family?: 'ipv4' | 'ipv6'): void;
declare function localIpUrl(name?: 'public' | 'private', family?: 'ipv4' | 'ipv6'): string;

export = localIpUrl
export = localIpUrl;
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"test": "jest",
"coverage": "jest --coverage"
},
"exports": {
".": "./index.js",
"./prepareUrls": "./prepareUrls.js"
},
"repository": {
"type": "git",
"url": "https://github.com/jaywcjlove/local-ip-url.git"
Expand Down
9 changes: 5 additions & 4 deletions prepareUrls.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

export interface Option {
interface Option {
protocol?: string;
host?: string;
port?: string | number;
}

export interface Result {
interface Result {
ip: string;
localUrl: string;
lanUrl: string;
}

export default function(option: Option): Result;
declare function prepareUrls(option: Option): Result;

export = prepareUrls;

0 comments on commit fb2792d

Please sign in to comment.