fix: cookie.expires can be a number (#42783)

* fix: cookie.expires can be a number

* fix: test
This commit is contained in:
Vincenzo Chianese
2020-03-12 19:14:53 -07:00
committed by GitHub
parent 584eb9feba
commit f4bb8b59e0
2 changed files with 511 additions and 511 deletions
+487 -487
View File
File diff suppressed because it is too large Load Diff
@@ -19,8 +19,8 @@ pb.findInParents('string', el => true); // $ExpectType PropertyBase<PropertyBase
pb.findParentContaining('string', el => true); // $ExpectType PropertyBase<PropertyBaseDefinition>
pb.forEachParent(el => {}); // $ExpectType void
pb.forEachParent({ withRoot: true }, el => {}); // $ExpectType void
pb.forEachParent(el => { }); // $ExpectType void
pb.forEachParent({ withRoot: true }, el => { }); // $ExpectType void
pb.meta(); // $ExpectType any
@@ -93,10 +93,10 @@ pList.assimilate(pList, false); // $ExpectType void
pList.assimilate([certificate], false); // ExpectType void
pList.clear(); // $ExpectType void
pList.count(); // $ExpectType number
pList.each((el: pmCollection.Certificate) => {}); // $ExpectType void
pList.each((el: pmCollection.Certificate) => {}, pList); // $ExpectType void
pList.eachParent((el: any) => {}); // $ExpectType void
pList.eachParent((el: any) => {}, pList); // $ExpectType void
pList.each((el: pmCollection.Certificate) => { }); // $ExpectType void
pList.each((el: pmCollection.Certificate) => { }, pList); // $ExpectType void
pList.eachParent((el: any) => { }); // $ExpectType void
pList.eachParent((el: any) => { }, pList); // $ExpectType void
pList.filter(el => true, pList); // $ExpectType Certificate[]
pList.find(el => true, pList); // $ExpectType Certificate
pList.get('string'); // $ExpectType any
@@ -144,8 +144,8 @@ ig.authorizeRequestsUsing('string'); // $ExpectType void
ig.authorizeRequestsUsing({}); // $ExpectType void
ig.authorizeRequestsUsing('string', new pmCollection.VariableList(ig, [])); // $ExpectType void
ig.forEachItem(el => {}); // $ExpectType void
ig.forEachItemGroup(el => {}); // $ExpectType void
ig.forEachItem(el => { }); // $ExpectType void
ig.forEachItemGroup(el => { }); // $ExpectType void
ig.oneDeep('string'); // $ExpectType Certificate
@@ -176,12 +176,12 @@ pmCollection.Collection.isCollection(collection); // $ExpectType boolean
// CookieDefinition Tests
const cookieDef: pmCollection.CookieDefinition = {
domain: 'string',
path: 'string',
domain: 'string',
path: 'string',
};
cookieDef.key; // $ExpectType string | undefined
cookieDef.value; // ExpectType string | undefined
cookieDef.expires; // $ExpectType string | Date | undefined
cookieDef.expires; // $ExpectType string | number | Date | undefined
cookieDef.maxAge; // $ExpectType number | undefined
cookieDef.domain; // $ExpectType string
cookieDef.path; // $ExpectType string
@@ -224,8 +224,8 @@ pmCollection.CookieList.isCookieList(cookieList); // $ExpectType boolean
// DescriptionDefinition Tests
const descDef: pmCollection.DescriptionDefinition = {
content: 'string',
type: 'string',
content: 'string',
type: 'string',
};
descDef.content; // $ExpectType string
descDef.type; // $ExpectType string | undefined
@@ -250,7 +250,7 @@ pmCollection.Description.isDescription(desc); // $ExpectType boolean
// EventDefinition Tests
const eventDesc: pmCollection.EventDefinition = {
script: 'string',
script: 'string',
};
eventDesc.listen; // $ExpectType string | undefined
eventDesc.script; // $ExpectType string | string[] | ScriptDefinition | Script
@@ -289,8 +289,8 @@ fp.valueOf(); // $ExpectType any
// HeaderDefinition Tests
const headerDef: pmCollection.HeaderDefinition = {
key: 'string',
value: 'string',
key: 'string',
value: 'string',
};
headerDef.key; // $ExpectType string | undefined
headerDef.value; // $ExpectType string | undefined
@@ -403,8 +403,8 @@ pmCollection.ProxyConfigList.isProxyConfigList(proxyConfigList); // $ExpectType
// QueryParamDefinition Tests
const qpDef: pmCollection.QueryParamDefinition = {
key: null,
value: null,
key: null,
value: null,
};
qpDef.key; // $ExpectType string | null
qpDef.value; // $ExpectType string | null
@@ -443,7 +443,7 @@ pmCollection.QueryParam.unparseSingle(qpDef, true); // $ExpectType string
// RequestDefinition Tests
const reqDef: pmCollection.RequestDefinition = {
url: 'string',
url: 'string',
};
reqDef.url; // $ExpectType string | Url
reqDef.method; // $ExpectType string | undefined
@@ -477,7 +477,7 @@ req.getHeaders({ ignoreCase: true }); // $ExpectType any
req.getHeaders({ enabled: true }); // $ExpectType any
req.getHeaders({ ignoreCase: true, enabled: true }); // $ExpectType any
req.forEachHeader((header: pmCollection.Header, context: pmCollection.Request) => {}); // $ExpectType void
req.forEachHeader((header: pmCollection.Header, context: pmCollection.Request) => { }); // $ExpectType void
req.addHeader(header); // $ExpectType void
req.addHeader(headerDef); // $ExpectType void
@@ -634,12 +634,12 @@ pmCollection.Script.isScript(script); // $ExpectType boolean
// UrlDefinition Tests
let urlDef: pmCollection.UrlDefinition = {
host: 'string',
path: 'string',
host: 'string',
path: 'string',
};
urlDef = {
host: ['string'],
path: ['string'],
host: ['string'],
path: ['string'],
};
urlDef.auth; // $ExpectType { user: string; password: string; } | undefined