mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Fix #7979, request.d.ts : Options union types
This commit is contained in:
@@ -110,6 +110,15 @@ var options: request.Options = {
|
||||
strictSSL: bool
|
||||
};
|
||||
|
||||
// Below line has compile error, use OptionsWithUri or OptionsWithUrl instead. See #7979.
|
||||
// options.uri = str;
|
||||
|
||||
const opt: request.OptionsWithUri = {
|
||||
baseUrl: 'http://localhost',
|
||||
uri: 'bar'
|
||||
};
|
||||
opt.uri = str;
|
||||
|
||||
// --- --- --- --- --- --- --- --- --- --- --- ---
|
||||
|
||||
agent = req.getAgent();
|
||||
|
||||
Reference in New Issue
Block a user