小编Pau*_*aul的帖子

TypeScript 装饰器的意外标记

我想测试一些使用 TypeScript 5.0 中新添加的装饰器(不是实验装饰器)的代码,如何让 Jest 解释该代码?

SyntaxError: Invalid or unexpected token当它遇到一个时我得到@

我的jest.config.js样子是这样的

module.exports = {
  preset: 'ts-jest',
  transform: {
    '^.+\\.(ts|tsx)?$': ['ts-jest', {
      tsConfig: 'tsconfig.esm.json'
    }],
    "^.+\\.(js|jsx)$": "babel-jest",
  }
};
Run Code Online (Sandbox Code Playgroud)

tsconfig.esm.json

{
  "compilerOptions": {
    "module": "esnext",
    "target": "esnext",
    "outDir": "dist/esm",
    "declaration": true,
    "declarationMap": true,
    "declarationDir": "dist/types",
    "sourceMap": true,
    "strict": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "moduleResolution": "nodenext",
    "baseUrl": ".",
    "paths": {
      "*": ["src/*"]
    }
  },
  "include": ["src/*.ts","src/**/*.ts", "test/*.ts"],
  "exclude": ["node_modules"]
}
Run Code Online (Sandbox Code Playgroud)

babel.config.js

module.exports = {presets: ['@babel/preset-env']}
Run Code Online (Sandbox Code Playgroud)

typescript jestjs babel-jest ts-jest

5
推荐指数
1
解决办法
595
查看次数

在“SYS.DBMS_DEBUG_JDWP”处拒绝网络访问

尝试保存触发器时出现此错误

Connecting to the database XE.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '192.168.56.1', '59537' )
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database XE.
Run Code Online (Sandbox Code Playgroud)

我只是使用 DB 的初学者,我该如何解决这个问题?

oracle acl oracle-sqldeveloper oracle18c

4
推荐指数
3
解决办法
2510
查看次数

等待 HTTP-01 质询传播:未能执行自检 GET 请求

我正在尝试按照本教程(https://github.com/digitalocean/Kubernetes-Starter-Kit-Developers/blob/main/03-setup-ingress )进行加密来保护我的 nginx-ingress 连接-controller/nginx.md)。

\n

我使用 helm 安装了 cert-manager (v1.8.0)。

\n

应用了我的 ClusterIssuerkubectl apply -f issuer.yaml

\n
apiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-nginx\nspec:\n  # ACME issuer configuration\n  # `email` - the email address to be associated with the ACME account (make sure it\'s a valid one)\n  # `server` - the URL used to access the ACME server\xe2\x80\x99s directory endpoint\n  # `privateKeySecretRef` - Kubernetes Secret to store the automatically generated ACME account private key\n  acme:\n    email: \'myemail\'\n    server: https://acme-staging-v02.api.letsencrypt.org/directory\n …
Run Code Online (Sandbox Code Playgroud)

azure lets-encrypt cert-manager nginx-ingress

2
推荐指数
1
解决办法
8136
查看次数