Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
switch (change.type) {
case FileChangeType.UPDATED:
for (const [id, subscriber] of this.subscribers) {
if (!subscriber.ignoreChangeEvents && this.uriMatches(subscriber, change)) {
subscriber.proxy.$fileChanged({ subscriberId: id, uri: theiaUritoUriComponents(change.uri), type: 'updated' });
}
}
break;
case FileChangeType.ADDED:
for (const [id, subscriber] of this.subscribers) {
if (!subscriber.ignoreCreateEvents && this.uriMatches(subscriber, change)) {
subscriber.proxy.$fileChanged({ subscriberId: id, uri: theiaUritoUriComponents(change.uri), type: 'created' });
}
}
break;
case FileChangeType.DELETED:
for (const [id, subscriber] of this.subscribers) {
if (!subscriber.ignoreDeleteEvents && this.uriMatches(subscriber, change)) {
subscriber.proxy.$fileChanged({ subscriberId: id, uri: theiaUritoUriComponents(change.uri), type: 'deleted' });
}
}
break;
}
}
}
if (e.some(change => change.uri.toString() === fileUri.toString() && change.type !== FileChangeType.DELETED)) {
this.go(location, false, false);