Skip to content
New issue

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

Error when using TS Decorators #27712

Open
NarHakobyan opened this issue Jan 17, 2025 · 3 comments
Open

Error when using TS Decorators #27712

NarHakobyan opened this issue Jan 17, 2025 · 3 comments

Comments

@NarHakobyan
Copy link

Version: Deno 2.1.6

Error when using argument decorators

Image

@bartlomieju
Copy link
Member

What is the content of your deno.json and the compilerOptions there?

@NarHakobyan
Copy link
Author

my bed, forgot to add deno.json. but after adding it gives another error.

Image

@NarHakobyan
Copy link
Author

{
  "imports": {
    "esbuild": "npm:esbuild",
    "@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader",
  },
  "compilerOptions": {
    "declaration": false,
    "noImplicitAny": true,
    "removeComments": true,
    "noLib": false,
    "skipLibCheck": true,
    "importHelpers": true,
    "allowSyntheticDefaultImports": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "allowUnreachableCode": false,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedParameters": true,
    "noUnusedLocals": true,
    "strictPropertyInitialization": true,
    "target": "ES2023",
    "noFallthroughCasesInSwitch": true,
    "sourceMap": true,
    "noEmitHelpers": true,
    "noUncheckedIndexedAccess": true,
    "outDir": "./dist",
    "baseUrl": "./src",
    "incremental": true,
    "isolatedModules": true,
    "strictNullChecks": true
  },
  "tasks": {
    "start": "deno run --allow-net --allow-read --allow-env --allow-ffi --allow-sys --unstable-sloppy-imports src/main.ts",
    "start:prod": "deno run --allow-net --allow-read --allow-env --allow-ffi --unstable-sloppy-imports dist/main.js",
    "watch": "deno run --allow-net --allow-read --allow-env --allow-ffi --unstable-sloppy-imports --watch=src/ src/main.ts",
    "test": "deno test --allow-net --allow-read --allow-env --allow-ffi",
    "compile": "deno compile --allow-read --allow-write --allow-env --allow-ffi --allow-ffi --unstable --output dist/main ./src/main.ts",
    "buildr": "yarn build:prod"
  },
  "fmt": {
    "options": {
      "useTabs": false,
      "lineWidth": 80,
      "indentWidth": 2,
      "singleQuote": true,
      "proseWrap": "preserve"
    }
  },
  "lint": {
    "rules": {
      "tags": ["recommended"],
      "include": ["src/**/*.ts"],
      "exclude": ["node_modules/"]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants