diff --git a/src/items/items.js b/src/items/items.js index 521fd438..9691f021 100644 --- a/src/items/items.js +++ b/src/items/items.js @@ -638,7 +638,7 @@ function existsItem (name) { * @memberof items * @param {string} name the name of the Item * @param {boolean} [nullIfMissing=false] whether to return null if the Item cannot be found (default is to throw an {@link https://www.openhab.org/javadoc/latest/org/openhab/core/items/itemnotfoundexception ItemNotFoundException}) - * @returns {Item} {@link items.Item} Item or `null` if `nullIfMissing` is true and Item is missing + * @returns {Item | null} {@link items.Item} Item or `null` if `nullIfMissing` is true and Item is missing */ function getItem (name, nullIfMissing = false) { try { diff --git a/types/items/items.d.ts b/types/items/items.d.ts index d1866546..e91d6adf 100644 --- a/types/items/items.d.ts +++ b/types/items/items.d.ts @@ -67,9 +67,9 @@ export function existsItem(name: string): boolean; * @memberof items * @param {string} name the name of the Item * @param {boolean} [nullIfMissing=false] whether to return null if the Item cannot be found (default is to throw an {@link https://www.openhab.org/javadoc/latest/org/openhab/core/items/itemnotfoundexception ItemNotFoundException}) - * @returns {Item} {@link items.Item} Item or `null` if `nullIfMissing` is true and Item is missing + * @returns {Item | null} {@link items.Item} Item or `null` if `nullIfMissing` is true and Item is missing */ -export function getItem(name: string, nullIfMissing?: boolean): Item; +export function getItem(name: string, nullIfMissing?: boolean): Item | null; /** * Gets all openHAB Items. * diff --git a/types/items/items.d.ts.map b/types/items/items.d.ts.map index 77b6c0f2..45dbef67 100644 --- a/types/items/items.d.ts.map +++ b/types/items/items.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/items/items.js"],"names":[],"mappings":";;;;;;;UAwBc,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;aACN,MAAM,EAAE;;;;WACR,MAAM,EAAE;;;;eACR,MAAM,MAAO;;;;;;;;iBAEb,MAAM;;;;;;;;;;uBAYP,OAAO,aAAa,EAAE,QAAQ;AAunB3C;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,MAAM,CAIa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GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,QAM7D;IAED;;;;;;OAMG;IACH,8BAJW,MAAM,GAAC,MAAM,GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,GACjD,OAAO,CA2BnB;IAED;;;;;OAKG;IACH,2BAHW,MAAM,GAAC,QAAQ,YAAU,GACxB,OAAO,CAuBlB;IAED;;;;;OAKG;IACH,2BAHW,MAAM,GAAC,QAAQ,YAAU,GACxB,OAAO,CAuBlB;IAED;;;;;;;OAOG;IACH,sEAkBC;IAED;;;OAGG;IACH,0BAKC;IAED;;;;OAIG;IACH,yBAEC;IAED;;;;;;OAMG;IACH,kBAJW,MAAM,GAAC,MAAM,GAAC,KAAK,aAAa,GAAC,QAAQ,YAAU,QAM7D;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,6CAIC;IAED;;;OAGG;IACH,gDAMC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,qBAFc,MAAM,UAKnB;IAED;;;OAGG;IACH,wBAFc,MAAM,UAOnB;IAED,gBAEC;CACF;;;;;;yBA5ZY,OAAO,eAAe,EAAE,aAAa"} \ No newline at end of file +{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/items/items.js"],"names":[],"mappings":";;;;;;;UAwBc,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;aACN,MAAM,EAAE;;;;WACR,MAAM,EAAE;;;;eACR,MAAM,MAAO;;;;;;;;iBAEb,MAAM;;;;;;;;;;uBAYP,OAAO,aAAa,EAAE,QAAQ;AAunB3C;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,MAAM,CAIa;AA/DhC;;;;;GAKG;AACH,iCAHW,MAAM,GACJ,OAAO,CASnB;AAED;;;;;;GAMG;AACH,8BAJW,MAAM,kBACN,OAAO,GACL,IAAI,GAAG,IAAI,CAYvB;AAED;;;;;GAKG;AACH,4BAFa,IAAI,EAAE,CAIlB;AAzJD;;;;;;;;;;;GAWG;A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