wmzy
wmzy
[`assert.throws`](https://nodejs.org/api/assert.html#assert_assert_throws_fn_error_message) support this. See the "Custom error validation" example.
使用默认链接,为什么不在进程初始化的的时候创建链接,然后: ```js // 定义schema const mongoose = require('mongoose') const NameSchema = new Schema({ name: String }) // 如果也在进程初始化的时候加载,此处不用export mongoose.model('Name', NameSchema); // curd const mongoose = require('mongoose') const NameModel = mongoose.model('Name')...
I use [pnpm.overrides](https://pnpm.io/zh/package_json#pnpmoverrides) remove the duplicate dependencies and resolved this problem.
@yilazius I also encountered this problem.I solved it like below: ```javascript it('reply with related', function () { return this.room.user.say('alice', '@hubot hello') .then(() => new Promise((res) => { const reply =...
@guyca Thanks. I found use [overrides](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) ([for yarn](https://classic.yarnpkg.com/en/docs/selective-version-resolutions)) could lock the `@babel/traverse` version easily.
I created a new plugin: [babel-plugin-typescript-decorators](https://github.com/wmzy/babel-plugin-typescript-decorators) . it is modified from [@babel/plugin-proposal-decorators](https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators). It will process parameter decorators before `class` escaping. In theory it would be more efficient and secure.
@guyca I don't think babel wants to support this syntax feature. Because it's just an experimental feature of TS and is likely to be deprecated.
See react-use [createGlobalState](https://github.com/streamich/react-use/blob/master/docs/createGlobalState.md).