修改数组扩展方法中的remove方法名, 避免和mongoose中相同方法冲突

This commit is contained in:
zhl 2021-05-28 11:30:32 +08:00
parent a76c7095be
commit 751cc54f97
2 changed files with 4 additions and 2 deletions

View File

@ -522,7 +522,7 @@ interface Array<T> {
* @returns {boolean} true
* false
*/
remove?(t: T): boolean
zremove?(t: T): boolean
/**
*
@ -671,7 +671,7 @@ Object.defineProperties(Array.prototype, {
},
writable: true,
},
remove: {
zremove: {
value: function <T>(this: T[], t: T) {
let idx = this.indexOf(t)
if (~idx) {

2
typings/extend.d.ts vendored
View File

@ -1,3 +1,5 @@
import fastify from 'fastify'
declare module 'fastify' {
interface FastifyRequest {
roles?: string[]