Skip to content

Facing Errors & Unexpected Issues in Modern.js – Need Solutions #6927

Answered by yimingjfe
Battosuai asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for your feedback. I hope my answer can solve your problem

This throws type error for error as it is set to unknown. What should be the type here?

  1. The type of error is unkown, which is expected. Here you can use type guard to avoid the error, such as error instanceof Error, isRouteErrorResponse(error).

issue 1, Duplicate identifier 'context'

  1. The input parameter of the function should be runtimeContext, which should be a mistake. Thanks for your feedback. I will fix it.

issue 2, where does the runtimeContext comes from? it is not declared anywhere.

  1. The init function is a conventional API; the framework will call the init function and inject the runtimeContext.

If I r…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Battosuai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants