mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Change return type of PropertyList.get (#25351)
This commit is contained in:
committed by
Wesley Wigham
parent
96816bfc6e
commit
05f447583f
2
types/postman-collection/index.d.ts
vendored
2
types/postman-collection/index.d.ts
vendored
@@ -103,7 +103,7 @@ export class PropertyList<TElement> extends PropertyBase<PropertyBaseDefinition>
|
||||
|
||||
find(rule: (item: TElement) => boolean, context: any): TElement;
|
||||
|
||||
get(key: string): TElement | undefined;
|
||||
get(key: string): any;
|
||||
|
||||
has(item: string | TElement, value?: any): boolean;
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ 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 Certificate | undefined
|
||||
pList.get("string"); // $ExpectType any
|
||||
pList.has("string"); // $ExpectType boolean
|
||||
pList.has("string", null); // $ExpectType boolean
|
||||
pList.has(certificate); // $ExpectType boolean
|
||||
|
||||
Reference in New Issue
Block a user