| 202 | } |
| 203 | |
| 204 | private warnIrrelevantFlags(type: ItemType, options: { [k: string]: any }): boolean { |
| 205 | const irrelevant: string[] = []; |
| 206 | if (type === 'change') { |
| 207 | for (const k of SPEC_FLAG_KEYS) if (k in options) irrelevant.push(k); |
| 208 | } else { |
| 209 | for (const k of CHANGE_FLAG_KEYS) if (k in options) irrelevant.push(k); |
| 210 | } |
| 211 | if (irrelevant.length > 0) { |
| 212 | console.error(`Warning: Ignoring flags not applicable to ${type}: ${irrelevant.join(', ')}`); |
| 213 | return true; |
| 214 | } |
| 215 | return false; |
| 216 | } |
| 217 | } |