Skip to content

Brownfield navigation: Object params are generated as Any in native code #312

@Doko-Demo-Doa

Description

@Doko-Demo-Doa

Hi Callstack team, we have been working with brownfield navigation library, but bumped onto this (issue?). For example, the brownfield.navigation.ts spec is:

export type DummyType = {
  testParams: string;
};

export interface BrownfieldNavigationSpec {
  test(arg: DummyType): void;
}

the generated native code (e.g: Swift) will be:

import Foundation

@objc public protocol BrownfieldNavigationDelegate: AnyObject {
    @objc func test(_ arg: Any)
}

Is this intended behavior? How can we generate type-safe code? Considering DummyType is just normal, serializable Javascript object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions