UNPKG

borderlands2

Version:

Borderlands 2 weapon damage and DPS calculation library

8 lines (6 loc) 288 B
import { Weapon, Type } from "../../weapon"; import { Context } from "../../context"; export type Decorator = (weapon: Weapon, context: Context) => boolean export function WeaponTypeDecorator(type: Type): Decorator { return (weapon: Weapon, context: Context) => type === weapon.type }