Created
May 4, 2019 04:41
-
-
Save josemarluedke/ee2612055aae28e4fa842d74f63caee9 to your computer and use it in GitHub Desktop.
Ember FastBoot service typescript type definitions
This file contains hidden or 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
declare module 'ember-cli-fastboot/services/fastboot' { | |
import Service from '@ember/service'; | |
interface Request { | |
method: string; | |
body: unknown; | |
cookies: unknown; | |
headers: unknown; | |
queryParams: unknown; | |
path: string; | |
protocol: string; | |
host: string; | |
} | |
interface Shoebox { | |
put(key: string, value: unknown): void; | |
retrieve(key: string): undefined | JSON; | |
} | |
export default class Fastboot extends Service { | |
public isFastBoot: boolean; | |
public request: Request; | |
public shoebox: Shoebox; | |
public response: unknown; // need types | |
public metadata: unknown; // need types | |
public deferRendering(promise: Promise<unknown>): unknown; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment