Last active
October 10, 2019 09:56
-
-
Save mastilver/b3bf8caec9e82855844edd407f0bcd50 to your computer and use it in GitHub Desktop.
babel-blade typings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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