mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
fix: cookie.expires can be a number (#42783)
* fix: cookie.expires can be a number * fix: test
This commit is contained in:
Vendored
+487
-487
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
|
||||
|
||||
Reference in New Issue
Block a user