修改数组扩展方法中的remove方法名, 避免和mongoose中相同方法冲突
This commit is contained in:
parent
a76c7095be
commit
751cc54f97
@ -522,7 +522,7 @@ interface Array<T> {
|
|||||||
* @returns {boolean} true 有这个数据并且删除成功
|
* @returns {boolean} true 有这个数据并且删除成功
|
||||||
* false 没有这个数据
|
* false 没有这个数据
|
||||||
*/
|
*/
|
||||||
remove?(t: T): boolean
|
zremove?(t: T): boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序 支持多重排序
|
* 排序 支持多重排序
|
||||||
@ -671,7 +671,7 @@ Object.defineProperties(Array.prototype, {
|
|||||||
},
|
},
|
||||||
writable: true,
|
writable: true,
|
||||||
},
|
},
|
||||||
remove: {
|
zremove: {
|
||||||
value: function <T>(this: T[], t: T) {
|
value: function <T>(this: T[], t: T) {
|
||||||
let idx = this.indexOf(t)
|
let idx = this.indexOf(t)
|
||||||
if (~idx) {
|
if (~idx) {
|
||||||
|
2
typings/extend.d.ts
vendored
2
typings/extend.d.ts
vendored
@ -1,3 +1,5 @@
|
|||||||
|
import fastify from 'fastify'
|
||||||
|
|
||||||
declare module 'fastify' {
|
declare module 'fastify' {
|
||||||
interface FastifyRequest {
|
interface FastifyRequest {
|
||||||
roles?: string[]
|
roles?: string[]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user