-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a677a8
commit 04dafea
Showing
4 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { RemoteDebugger, REMOTE_DEBUGGER_PORT } from './lib/remote-debugger'; | ||
import { RemoteDebuggerRealDevice } from './lib/remote-debugger-real-device'; | ||
import type { RemoteDebuggerRealDeviceOptions, RemoteDebuggerOptions } from './lib/types'; | ||
|
||
export function createRemoteDebugger<T extends boolean> ( | ||
opts: T extends true ? RemoteDebuggerRealDeviceOptions : RemoteDebuggerOptions, | ||
realDevice: T | ||
): T extends true ? RemoteDebuggerRealDevice : RemoteDebugger { | ||
// @ts-ignore TS does not understand that | ||
return realDevice | ||
? new RemoteDebuggerRealDevice(opts as RemoteDebuggerRealDeviceOptions) | ||
: new RemoteDebugger(opts); | ||
} | ||
|
||
export { RemoteDebugger, RemoteDebuggerRealDevice, REMOTE_DEBUGGER_PORT }; | ||
export type { RemoteDebuggerRealDeviceOptions, RemoteDebuggerOptions }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"lib": "lib" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.ts", | ||
"lib", | ||
"build", | ||
"scripts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"checkJs": true | ||
}, | ||
"include": [ | ||
"index.js", | ||
"index.ts", | ||
"lib" | ||
] | ||
} |