Skip to content

Wrong type definition for $navigateBack #662

Closed
@ebsi-cgoboncan

Description

@ebsi-cgoboncan

Version

2.6.4

Reproduction link

https://play.nativescript.org/?template=play-vue&id=PUbKRL&v=2

Platform and OS info

All

Steps to reproduce

Pass a NavigationEntry object to this.$navigateBack

What is expected?

No typescript error when passing a NavigationEntry object to this.$navigateBack

What is actually happening?

Typescript compiler error:
Expected 0 arguments, but got 1.


In index.d.ts, the type alias should be added:
export type navigateBack = (options?: NavigationEntryVue, backstackEntry: BackstackEntry) => void

NativeScriptVue and NativeScriptVueConstructor interfaces should be changed from:

$navigateBack: () => void

to

$navigateBack: navigateBack

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions