DeprecatedTopLevelHashlike type

Base type for user-defined hash-like types. This is a workaround: it's not possible currently no inherit from the built-in Hash type.

Direct parent types

HashLike
Base type for user-defined hash-like types. This is a workaround: it's not possible currently no inherit from the built-in Hash type.
Direct subtypes: 4

Methods

.(hl:DeprecatedTopLevelHashlike, k:Any) Source: stdlib.ngs:2144
Get value by key. Throws KeyNotFound.

Automatically called by NGS for syntax

your_hashlike.literal_key

Returns

Any
.=(hl:DeprecatedTopLevelHashlike, k:Any, v:Any) Source: stdlib.ngs:2155
Set value.

Automatically called by NGS for syntax

your_hashlike.literal_key = v

Returns

v
[](hl:DeprecatedTopLevelHashlike, k:Any) Source: stdlib.ngs:2124
Get value by key. Throws KeyNotFound.

Automatically called by NGS for syntax

your_hashlike[k]
[]=(hl:DeprecatedTopLevelHashlike, k:Any, v:Any) Source: stdlib.ngs:2134
Set value.

Automatically called by NGS for syntax

your_hashlike[k] = v
init(hl:DeprecatedTopLevelHashlike, deprecated_field:Any, h:Hash=null) Source: stdlib.ngs:2165
Create a HashLike.

Parameters

hIf provided, used as initial value.

Example

HashLike(%{a aha b bee}) # <HashLike a=aha b=bee>