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

No exported member 'DoubleTapGestureEventData' #1

Open shirakaba opened 4 years ago

shirakaba commented 4 years ago

Found just one type error in this commit, for tns-core-modules@6.5.0:

Namespace '"/Users/jamie/Documents/git/react-nativescript/react-nativescript/node_modules/@nativescript/core/ui/gestures/gestures"' has no exported member 'DoubleTapGestureEventData'
type DoubleTapGestureEventData = import("@nativescript/core/ui/gestures/gestures").DoubleTapGestureEventData;

image

When I hand-wrote the types for that event handler, I concluded that the signature should be simply be GestureEventData:

onDoubleTap?: (args: import("@nativescript/core/ui/gestures/gestures").GestureEventData) => void;
onTap?: (arg:  import("@nativescript/core/ui/gestures/gestures").GestureEventData) => any;

Otherwise, they compile perfectly!

halfnelson commented 4 years ago

Looks like the source I cloned is out of date, DoubleTap was changed https://github.com/NativeScript/NativeScript/commit/8dbb623944a600414fa072d069995a9edc839903#diff-3f80223a1591f9dc4b33166dddb1f4dd Mid march.

shirakaba commented 4 years ago

That'd explain it!