Skip to content

How does remult injection into BackendMethods in Deno work? #181

Answered by noam-honig
ChrisRimmer asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ChrisRimmer,

There are several options you can use:

Option 1 - Add "emitDecoratorMetadata" to deno:

Change deno.json

{
  "tasks": {
    "start": "deno run -A --watch=static/,routes/ dev.ts"
  },
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata":true
    
  },
  "importMap": "./import_map.json"
}

It spits out a warning saying that the option was ignored - but it is not ignored, and it works.

option 2 - specify parameter type:

In the BackendMethod decorator, specify the parameter types:

 @BackendMethod({allowed: true, paramTypes: [String,String,Remult})

Check it out and let me know

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChrisRimmer
Comment options

Answer selected by ChrisRimmer
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