client: add return types to functions
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
Norm 2022-09-04 19:31:11 -04:00
parent db5019d3ec
commit 19f8f095c7
Signed by: norm
GPG key ID: 7123E30E441E80DE
3 changed files with 9 additions and 9 deletions

View file

@ -12,7 +12,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData
// TODO: set default values
});
export async function fetchInstance() {
export async function fetchInstance(): Promise<void> {
const meta = await api('meta', {
detail: false,
});

View file

@ -163,7 +163,7 @@ export class Router extends EventEmitter<{
return null;
}
private navigate(path: string, key: string | null | undefined, initial = false) {
private navigate(path: string, key: string | null | undefined, initial = false): void {
const beforePath = this.currentPath;
this.currentPath = path;
@ -195,23 +195,23 @@ export class Router extends EventEmitter<{
}
}
public getCurrentComponent() {
public getCurrentComponent(): Component | null {
return this.currentComponent;
}
public getCurrentProps() {
public getCurrentProps(): Map<string, string> | null {
return this.currentProps;
}
public getCurrentPath() {
public getCurrentPath(): string {
return this.currentPath;
}
public getCurrentKey() {
public getCurrentKey(): string {
return this.currentKey;
}
public push(path: string) {
public push(path: string): void {
const beforePath = this.currentPath;
if (path === beforePath) {
this.emit('same');
@ -231,7 +231,7 @@ export class Router extends EventEmitter<{
});
}
public change(path: string, key?: string | null) {
public change(path: string, key?: string | null): void {
this.navigate(path, key);
}
}

View file

@ -130,7 +130,7 @@ export class Storage<T extends StateDef> {
this.set(key, [...currentState, value]);
}
public reset(key: keyof T) {
public reset(key: keyof T): void {
this.set(key, this.def[key].default);
}