Fix #7979, request.d.ts : Options union types

This commit is contained in:
Leo Liang
2016-02-06 11:07:09 +08:00
parent f7164a47ff
commit 90c7b5653c
2 changed files with 13 additions and 1 deletions
+9
View File
@@ -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();