Fix typo in JSDOC

This commit is contained in:
DigiLive
2025-04-05 11:18:24 +02:00
parent 2704d80d3f
commit 58952274d2
5 changed files with 15 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
import {Helper} from "../Helper";
import {EntityCardConfig} from "../types/lovelace-mushroom/cards/entity-card-config";
import {cards} from "../types/strategy/cards";
import {generic} from "../types/strategy/generic";
import {EntityCardConfig} from "../types/lovelace-mushroom/cards/entity-card-config";
/**
* Abstract Card Class
@@ -46,7 +46,7 @@ abstract class AbstractCard {
/**
* Get a card.
*
* @return {cards.AbstractCardConfig} A card object.
* @returns {cards.AbstractCardConfig} A card object.
*/
getCard(): cards.AbstractCardConfig {
return {

View File

@@ -1,7 +1,7 @@
import {cards} from "../types/strategy/cards";
import {LovelaceCardConfig} from "../types/homeassistant/data/lovelace";
import {HassServiceTarget} from "home-assistant-js-websocket";
import {LovelaceCardConfig} from "../types/homeassistant/data/lovelace";
import {StackCardConfig} from "../types/homeassistant/panels/lovelace/cards/types";
import {cards} from "../types/strategy/cards";
/**
* Controller Card class.
@@ -49,7 +49,7 @@ class ControllerCard {
/**
* Create a Controller card.
*
* @return {StackCardConfig} A Controller card.
* @returns {StackCardConfig} A Controller card.
*/
createCard(): StackCardConfig {
const cards: LovelaceCardConfig[] = [

View File

@@ -1,8 +1,8 @@
import {HomeAssistant} from "./types/homeassistant/types";
import * as de from "./translations/de.json";
import * as en from "./translations/en.json";
import * as es from "./translations/es.json";
import * as nl from "./translations/nl.json";
import * as de from "./translations/de.json";
import {HomeAssistant} from "./types/homeassistant/types";
/* Registry of currently supported languages */
const languages: Record<string, unknown> = {
@@ -21,7 +21,7 @@ const DEFAULT_LANG = "en";
* @param {string} key The keyword to look for in object notation (E.g. generic.home).
* @param {string} lang The language to get the string from (E.g. en).
*
* @return {string | undefined} The requested string or undefined if the keyword doesn't exist/on error.
* @returns {string | undefined} The requested string or undefined if the keyword doesn't exist/on error.
*/
function getTranslatedString(key: string, lang: string): string | undefined {
try {
@@ -46,7 +46,7 @@ function getTranslatedString(key: string, lang: string): string | undefined {
* If the keyword is undefined, or on error, the keyword itself is returned.
*
* @param {HomeAssistant} hass The Home Assistant object.
* @return {(key: string) => string} The function to call for translating strings.
* @returns {(key: string) => string} The function to call for translating strings.
*/
export default function setupCustomLocalize(hass?: HomeAssistant): (key: string) => string {
return function (key: string) {

View File

@@ -68,7 +68,7 @@ abstract class AbstractView {
/**
* Create the cards to include in the view.
*
* @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects.
* @returns {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects.
*/
async createViewCards(): Promise<(StackCardConfig | TitleCardConfig)[]> {
if (this.#domain === "home") {
@@ -154,7 +154,7 @@ abstract class AbstractView {
* Get a target of entity IDs for the given domain.
*
* @param {string} domain - The target domain to retrieve entity IDs from.
* @return {HassServiceTarget} - A target for a service call.
* @returns {HassServiceTarget} - A target for a service call.
*/
targetDomain(domain: string): HassServiceTarget {
return {

View File

@@ -49,7 +49,7 @@ class HomeView extends AbstractView {
/**
* Create the cards to include in the view.
*
* @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.
* @returns {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.
* @override
*/
async createViewCards(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {
@@ -123,7 +123,7 @@ class HomeView extends AbstractView {
/**
* Create the chips to include in the view.
*
* @return {Promise<LovelaceChipConfig[]>} Promise a chip array.
* @returns {Promise<LovelaceChipConfig[]>} Promise a chip array.
*/
async #createChips(): Promise<LovelaceChipConfig[]> {
if ((Helper.strategyOptions.home_view.hidden as string[]).includes("chips")) {
@@ -185,7 +185,7 @@ class HomeView extends AbstractView {
/**
* Create the person cards to include in the view.
*
* @return {PersonCardConfig[]} A Person Card array.
* @returns {PersonCardConfig[]} A Person Card array.
*/
#createPersonCards(): PersonCardConfig[] {
if ((Helper.strategyOptions.home_view.hidden as string[]).includes("persons")) {
@@ -214,7 +214,7 @@ class HomeView extends AbstractView {
*
* Area cards are grouped into two areas per row.
*
* @return {Promise<(TitleCardConfig | StackCardConfig)[]>} Promise an Area Card Section.
* @returns {Promise<(TitleCardConfig | StackCardConfig)[]>} Promise an Area Card Section.
*/
async #createAreaSection(): Promise<(TitleCardConfig | StackCardConfig)[]> {
if ((Helper.strategyOptions.home_view.hidden as string[]).includes("areas")) {