Skip to content

Commit 78fad76

Browse files
Explicit return types specified to FormStoresHandler.
1 parent 041a69b commit 78fad76

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/simplr-forms-core/src/stores/form-stores-handler.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class FormStoresHandler extends ActionEmitter {
1313
this.resetFormStores();
1414
}
1515

16-
protected GetFormStoreId(formNumber: number) {
16+
protected GetFormStoreId(formNumber: number): string {
1717
return `form-store-${formNumber}`;
1818
}
1919

@@ -24,7 +24,7 @@ export class FormStoresHandler extends ActionEmitter {
2424
*
2525
* @memberOf FormStoresHandlerClass
2626
*/
27-
public NextStoreId() {
27+
public NextStoreId(): string {
2828
return this.GetFormStoreId(++this.storesCount);
2929
}
3030

@@ -35,7 +35,7 @@ export class FormStoresHandler extends ActionEmitter {
3535
*
3636
* @memberOf FormStoresHandlerClass
3737
*/
38-
public get StoresCount() {
38+
public get StoresCount(): number {
3939
return this.formStores.count();
4040
}
4141

@@ -51,7 +51,7 @@ export class FormStoresHandler extends ActionEmitter {
5151
*
5252
* @memberOf FormStoreHandlerBase
5353
*/
54-
public RegisterForm(customFormId?: string, store?: any) {
54+
public RegisterForm(customFormId?: string, store?: any): string {
5555
if (customFormId != null) {
5656
// To keep store count present nomatter the customFormId was given
5757
++this.storesCount;
@@ -81,7 +81,7 @@ export class FormStoresHandler extends ActionEmitter {
8181
*
8282
* @memberOf FormStoreHandlerBase
8383
*/
84-
public UnregisterForm(formId: string) {
84+
public UnregisterForm(formId: string): void {
8585
const store = this.formStores.get(formId);
8686
if (store != null) {
8787
this.formStores = this.formStores.delete(formId);
@@ -97,7 +97,7 @@ export class FormStoresHandler extends ActionEmitter {
9797
*
9898
* @memberOf FormStoreHandlerBase
9999
*/
100-
public GetStore(formId: string) {
100+
public GetStore(formId: string): FormStore {
101101
return this.formStores.get(formId);
102102
}
103103

@@ -109,11 +109,11 @@ export class FormStoresHandler extends ActionEmitter {
109109
*
110110
* @memberOf FormStoreHandlerBase
111111
*/
112-
public Exists(formId: string) {
112+
public Exists(formId: string): boolean {
113113
return this.formStores.has(formId);
114114
}
115115

116-
private resetFormStores() {
116+
private resetFormStores(): void {
117117
this.storesCount = 0;
118118
this.formStores = Immutable.Map<string, FormStore>();
119119
}

0 commit comments

Comments
 (0)