@inrupt/solid-client / thing/set
Module: thing/set#
Type Aliases#
SetOfType#
Ƭ SetOfType<Type
>: <T>(thing
: T
, property
: Url
| UrlString
, value
: Type
) => T
Type parameters#
Name |
---|
|
Type declaration#
▸ <T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given value for the given Property.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a value on. |
|
Property for which to set the given value. |
|
|
|
Value to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
Functions#
setBoolean#
▸ setBoolean<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given boolean for the given Property.
To preserve existing values, see [[addBoolean]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a boolean value on. |
|
|
Property for which to set the given boolean value. |
|
|
Boolean to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
setDate#
▸ setDate<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given date for the given Property.
To preserve existing values, see [[addDate]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set an date value on. |
|
|
Property for which to set the given date value. |
|
|
Date to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Since
1.10.0
Defined in#
src/thing/set.ts:334
setDatetime#
▸ setDatetime<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given datetime for the given Property.
To preserve existing values, see [[addDatetime]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set an datetime value on. |
|
|
Property for which to set the given datetime value. |
|
|
Datetime to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
setDecimal#
▸ setDecimal<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given decimal for the given Property.
To preserve existing values, see [[addDecimal]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a decimal value on. |
|
|
Property for which to set the given decimal value. |
|
|
Decimal to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
setInteger#
▸ setInteger<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given integer for the given Property.
To preserve existing values, see [[addInteger]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set an integer value on. |
|
|
Property for which to set the given integer value. |
|
|
Integer to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
setStringEnglish#
▸ setStringEnglish<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given English string for the given Property.
To preserve existing values, see [[addStringEnglish]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a localised string value on. |
|
|
Property for which to set the given localised string value. |
|
|
Localised string to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Since
1.13.0
Defined in#
src/thing/set.ts:196
setStringNoLocale#
▸ setStringNoLocale<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given unlocalised string for the given Property.
To preserve existing values, see [[addStringNoLocale]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set an unlocalised string value on. |
|
|
Property for which to set the given unlocalised string value. |
|
|
Unlocalised string to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334
setStringWithLocale#
▸ setStringWithLocale<T
>(thing
, property
, value
, locale
): T
Create a new Thing with existing values replaced by the given localised string for the given Property.
To preserve existing values, see [[addStringWithLocale]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a localised string value on. |
|
|
Property for which to set the given localised string value. |
|
|
Localised string to set on |
|
|
Locale of the added string. |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:217
setTime#
▸ setTime<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given time for the given Property.
To preserve existing values, see [[addTime]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set an time value on. |
|
|
Property for which to set the given time value. |
|
|
time to set on |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Since
1.10.0
Defined in#
src/thing/set.ts:334
setUrl#
▸ setUrl<T
>(thing
, property
, value
): T
Create a new Thing with existing values replaced by the given URL for the given Property.
To preserve existing values, see [[addUrl]].
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters#
Name |
Type |
---|---|
|
extends |
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
Thing to set a URL value on. |
|
|
Property for which to set the given URL value. |
|
|
- |
Returns#
T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in#
src/thing/set.ts:334