Skip to content

Commit

Permalink
chore: add return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Delusoire committed Aug 8, 2024
1 parent 3a5af9a commit 08e252d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class Module extends ModuleBase<Module, ModuleInstance> {
await instance.onEnable();
}

public async fastEnable(instance: ModuleInstance) {
public async fastEnable(instance: ModuleInstance): Promise<boolean> {
return instance.transition.new(async () => {
const enabledInstance = this.getEnabledInstance();
await enabledInstance?.transition.block();
Expand Down Expand Up @@ -759,7 +759,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
this.installed = true;
}

public async fastInstall() {
public async fastInstall(): Promise<this | null> {
return this.transition.new(async () => {
if (this.isInstalled()) {
return null;
Expand Down Expand Up @@ -863,7 +863,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
this.installed = false;
}

public async fastDelete() {
public async fastDelete(): Promise<this | null> {
return this.transition.new(async () => {
if (!this.isInstalled() || this.isLoaded()) {
return null;
Expand Down Expand Up @@ -900,7 +900,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
this.added = false;
}

public async fastRemove() {
public async fastRemove(): Promise<this | null> {
return this.transition.new(async () => {
if (!this.isLocal() || this.isLoaded()) {
return null;
Expand Down

0 comments on commit 08e252d

Please sign in to comment.