We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! It would be nice if you could provide a .d.ts file for typescript folks like me :) Thanks
.d.ts
The text was updated successfully, but these errors were encountered:
I did a first pass:
declare module 'prerender-node' { import { NextFunction, Request, Response } from 'express'; declare function prerender( req: Request, res: Response, next: NextFunction ): void; declare namespace prerender { type Done = (page?: { status: number; body: string | Buffer }) => void; type Set = { prerenderToken: string; beforeRender: (req: Request, done: Done) => void; afterRender: (err: any, req: Request, prerenderRes: any) => void; protocol: 'http' | 'https'; host: string; forwardHeaders: boolean; prerenderServerRequestOptions: Record<string, any>; }; declare function set<T extends keyof Set>( name: T, value: Set[T] ): typeof prerender; declare function whitelisted( whitelist: string | string[] ): typeof prerender; declare function blacklisted( blacklist: string | string[] ): typeof prerender; } export = prerender; }
Sorry, something went wrong.
@Sytten thanks for providing these definitions 👍
Just a small correction:
type Done = (err?: Error | null, page?: { status?: number; body?: string | Buffer }) => void;
No branches or pull requests
Hi!
It would be nice if you could provide a
.d.ts
file for typescript folks like me :)Thanks
The text was updated successfully, but these errors were encountered: