refactor: IDrop interface => abstract method

This commit is contained in:
harttle
2019-02-28 00:05:08 +08:00
parent d5b9916b2f
commit b69c3a3203
6 changed files with 12 additions and 20 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
import { Drop } from './drop'
import { IComparable } from './icomparable'
import { isObject, isString, isArray } from '../util/underscore'
import { IDrop } from '../drop/idrop'
export class EmptyDrop extends Drop implements IDrop, IComparable {
export class EmptyDrop extends Drop implements IComparable {
equals (value: any) {
if (isString(value) || isArray(value)) return value.length === 0
if (isObject(value)) return Object.keys(value).length === 0