Change return type of PropertyList.get (#25351)

This commit is contained in:
Kyle Buzby
2018-04-26 17:46:17 -05:00
committed by Wesley Wigham
parent 96816bfc6e
commit 05f447583f
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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