Skip to content

Commit

Permalink
Added missing type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaakko Heusala committed Jan 3, 2024
1 parent 23c4cf9 commit 436b10a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions entities/component/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export interface Component
* @param name
* @param value
*/
setMetaString (name : string, value: string) : this;
setMetaString (name : string, value: string | undefined) : this;

/**
* Get a value of internal number meta property.
Expand All @@ -193,7 +193,7 @@ export interface Component
* @param name
* @param value
*/
setMetaNumber (name : string, value: number) : this;
setMetaNumber (name : string, value: number | undefined) : this;

/**
* Get a value of internal boolean meta property.
Expand All @@ -208,7 +208,7 @@ export interface Component
* @param name
* @param value
*/
setMetaBoolean (name : string, value: boolean) : this;
setMetaBoolean (name : string, value: boolean | undefined) : this;

/**
* Get a value of internal object meta property.
Expand All @@ -223,7 +223,7 @@ export interface Component
* @param name
* @param value
*/
setMetaObject (name : string, value: ReadonlyJsonObject | null) : this;
setMetaObject (name : string, value: ReadonlyJsonObject | null | undefined) : this;

/**
* Get a value of internal array meta property.
Expand All @@ -248,7 +248,7 @@ export interface Component
* @param name
* @param value
*/
setMetaArray (name : string, value: ReadonlyJsonArray) : this;
setMetaArray (name : string, value: ReadonlyJsonArray | undefined) : this;


////////////////////////////////////////////////////////////////////////////
Expand Down
11 changes: 6 additions & 5 deletions entities/view/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export interface View
* @param name
* @param value
*/
setMetaString (name : string, value: string) : this;
setMetaString (name : string, value: string | undefined) : this;

/**
* Get a value of internal number meta property.
Expand All @@ -294,7 +294,7 @@ export interface View
* @param name
* @param value
*/
setMetaNumber (name : string, value: number) : this;
setMetaNumber (name : string, value: number | undefined) : this;

/**
* Get a value of internal boolean meta property.
Expand All @@ -309,7 +309,7 @@ export interface View
* @param name
* @param value
*/
setMetaBoolean (name : string, value: boolean) : this;
setMetaBoolean (name : string, value: boolean | undefined) : this;

/**
* Get a value of internal object meta property.
Expand All @@ -324,7 +324,7 @@ export interface View
* @param name
* @param value
*/
setMetaObject (name : string, value: ReadonlyJsonObject | null) : this;
setMetaObject (name : string, value: ReadonlyJsonObject | null | undefined) : this;

/**
* Get a value of internal array meta property.
Expand All @@ -337,6 +337,7 @@ export interface View
* Get a value of internal array meta property.
*
* @param name
* @param isItemOf
*/
getMetaArrayOf<T extends ReadonlyJsonAny = ReadonlyJsonAny> (
name : string,
Expand All @@ -349,6 +350,6 @@ export interface View
* @param name
* @param value
*/
setMetaArray (name : string, value: ReadonlyJsonArray) : this;
setMetaArray (name : string, value: ReadonlyJsonArray | undefined) : this;

}

0 comments on commit 436b10a

Please sign in to comment.