workers-sdk
workers-sdk copied to clipboard
Chore: refactor api/unstable_dev()'s types
At the moment, unstable_dev
takes an object of options, with the following type:
interface DevOptions {
env?: string;
ip?: string;
port?: number;
localProtocol?: "http" | "https";
assets?: string;
site?: string;
siteInclude?: string[];
siteExclude?: string[];
nodeCompat?: boolean;
experimentalEnableLocalPersistence?: boolean;
_: (string | number)[]; //yargs wants this
$0: string; //yargs wants this
}
Ideally, consumers of unstable_dev
shouldn't have to know about yargs, so we should resolve whatever typescript problem that requires us to add _
and $0
into that interface.
Also, we should review whether we want to add or remove options from this list for the initial "stable" release of dev
.