Skip to content

Instantly share code, notes, and snippets.

@mastilver
Last active October 10, 2019 09:56
Show Gist options
  • Save mastilver/b3bf8caec9e82855844edd407f0bcd50 to your computer and use it in GitHub Desktop.
Save mastilver/b3bf8caec9e82855844edd407f0bcd50 to your computer and use it in GitHub Desktop.
babel-blade typings
interface Movie {
id: string;
name: string;
}
interface MovieArguments {
id: string
}
interface CallableMovie extends Movie {
(arg: (fragmentName: string) => string | MovieArguments): Movie
}
interface DataQuery {
movie: CallableMovie;
}
function createQuery(): (data: any) => DataQuery {
throw new Error('NotImplemented')
}
const movieQuery = createQuery()
const result = movieQuery({})
result.movie.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment