halfnelson / nativescript-source-to-jsx-def

Walk nativescript source to generate JSX types for `svelte-type-checker-vscode`
Other
4 stars 1 forks source link

Unused types #3

Closed shirakaba closed 4 years ago

shirakaba commented 4 years ago

Not that there's any harm (beyond giving the TypeScript compiler a little extra work), but I found that the following types imported at the top of the file are unused by the interfaces below, which might be of interest:

type ActionBarCommonActionItems = import("@nativescript/core/ui/action-bar/action-bar-common").ActionItems;

type FrameInterfacesNavigationTransition = import("@nativescript/core/ui/frame/frame-interfaces").NavigationTransition;
type FrameInterfacesBackstackEntry = import("@nativescript/core/ui/frame/frame-interfaces").BackstackEntry;
type FrameInterfacesNavigationEntry = import("@nativescript/core/ui/frame/frame-interfaces").NavigationEntry;
shirakaba commented 4 years ago

... Actually, I see that they are probably re-exports.

From the action-bar folder:

// action-bar
type ActionItems = import("@nativescript/core/ui/action-bar/action-bar").ActionItems;

// action-bar-common
type ActionBarCommonActionItems = import("@nativescript/core/ui/action-bar/action-bar-common").ActionItems;

From the frame folder:

// frame
type BackstackEntry = import("@nativescript/core/ui/frame/frame").BackstackEntry;
type NavigationEntry = import("@nativescript/core/ui/frame/frame").NavigationEntry;
type NavigationTransition = import("@nativescript/core/ui/frame/frame").NavigationTransition;

// frame-interfaces
type FrameInterfacesNavigationTransition = import("@nativescript/core/ui/frame/frame-interfaces").NavigationTransition;
type FrameInterfacesBackstackEntry = import("@nativescript/core/ui/frame/frame-interfaces").BackstackEntry;
type FrameInterfacesNavigationEntry = import("@nativescript/core/ui/frame/frame-interfaces").NavigationEntry;

Not sure what would be best to do about them.

halfnelson commented 4 years ago

Fixed in recent push