Skip to content

Latest commit

 

History

History
45 lines (40 loc) · 1.18 KB

File metadata and controls

45 lines (40 loc) · 1.18 KB


import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Untyped maps (AnyMap / object)

An untyped map represents a JSON-like structure with a value that can either be a number, a string, a boolean, a bigint, a null, an array or an object.

```ts interface Fetch extends HybridObject { get(url: string): AnyMap } ``` ```swift class HybridFetch: HybridFetchSpec { func get(url: String) -> AnyMap } ``` ```kotlin class HybridFetch: HybridFetchSpec() { fun get(url: String): AnyMap } ``` ```cpp class HybridFetch: public HybridFetchSpec { std::shared_ptr get(const std::string& url); } ```

:::tip While untyped maps are implemented efficiently, Nitro cannot sufficiently optimize the object as keys and value-types are not known in advance. If possible, avoid untyped maps and use strongly typed objects instead. :::