Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

boot-server.tsx no longer compiles with TypeScript 2.4 (React + Redux template) #1034

Copy link
Copy link
@chris-nissen

Description

@chris-nissen
Issue body actions

Title

boot-server.tsx no longer compiles with TypeScript 2.4 (React + Redux template)

Functional impact

When webpacking in prod env mode, projects will fail TypeScript compilation. I'm not sure if any of the other templates are affected, but I expect they would be.

Minimal repro steps

  1. dotnet new reactredux
  2. Update the version of typescript to "2.4.0" in package.json
  3. npm install
  4. node node_modules/webpack/bin/webpack.js --env.prod

Expected result

Successful compilation.

Actual result

TS2345: Argument of type '(params: BootFuncParams) => Promise' is not assignable to parameter of type 'BootFunc'.
Type 'Promise' is not assignable to type 'Promise'.
Type 'RenderResult' is not assignable to type 'RenderToStringResult'.
Type 'RedirectResult' is not assignable to type 'RenderToStringResult'.
Property 'html' is missing in type 'RedirectResult'.

Further technical details

I think this can be fixed by updating the BootFunc interface like so:

interface BootFunc {
    (params: BootFuncParams): Promise<RenderToStringResult | RedirectResult>;
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.