@glissandoo/lib 1.54.2 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/helpers/errors.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { APlayerBasicData } from '../models/Player/types';
|
|
2
|
+
import { AThemeBasicData } from '../models/Repertory/types';
|
|
1
3
|
import { CustomInstrumentId } from './instruments';
|
|
2
4
|
export declare enum HttpsErrorMessages {
|
|
3
5
|
InvalidGroup = "error.group.noValid",
|
|
@@ -61,11 +63,10 @@ export declare enum HttpsErrorMessages {
|
|
|
61
63
|
}
|
|
62
64
|
export interface HttpsErrorDetails extends Record<HttpsErrorMessages, unknown> {
|
|
63
65
|
[HttpsErrorMessages.ThemesWithCustomInstrumentsToBeDeleted]: {
|
|
64
|
-
|
|
66
|
+
theme: AThemeBasicData;
|
|
65
67
|
customInstruments: CustomInstrumentId[];
|
|
66
68
|
}[];
|
|
67
69
|
[HttpsErrorMessages.PlayersWithCustomInstrumentsToBeDeleted]: {
|
|
68
|
-
|
|
69
|
-
customMainInstrument: CustomInstrumentId;
|
|
70
|
+
player: APlayerBasicData;
|
|
70
71
|
}[];
|
|
71
72
|
}
|
|
@@ -11,7 +11,7 @@ class GroupInstrument extends _1.default {
|
|
|
11
11
|
this.groupInstruments = groupInstruments;
|
|
12
12
|
}
|
|
13
13
|
static isCustom(instrumentId) {
|
|
14
|
-
return instrumentId.startsWith('customInstrument-');
|
|
14
|
+
return (instrumentId || '').startsWith('customInstrument-');
|
|
15
15
|
}
|
|
16
16
|
get isCustomInstrument() {
|
|
17
17
|
return GroupInstrument.isCustom(this.id);
|