Add .d.ts file and include in package.json
We're not currently exporting any Typescript definitions. This means that each project has to define it's own sling-connector types. Better to include in this project directly.
Sample of what we're doing in other projects
declare module 'sling-connector' {
export interface SlingConnector {
slingql(slingQlQuery: {query: string, variables?: {[key: string]: any}}): Promise<any>
get(path: string, depth?: number | "infinity", options?: SlingOptions): Promise<any>
getSling(path: string, options?: SlingOptions): Promise<any>
}
export type SlingOptions = {
dontParseBody?: boolean
leaveMangledNames?: boolean
}
}