@nukleus-sports/core 0.7.0 → 0.8.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/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -14
- package/dist/index.d.ts +8 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -103,13 +103,14 @@ interface RosterColumnDef {
|
|
|
103
103
|
key: RosterColumnKey;
|
|
104
104
|
label: string;
|
|
105
105
|
}
|
|
106
|
+
/** Optional-or-null throughout so an app's own `Player` type (optional fields) satisfies it directly. */
|
|
106
107
|
interface RosterPlayerLike {
|
|
107
|
-
first_name
|
|
108
|
-
last_name
|
|
109
|
-
number
|
|
110
|
-
position
|
|
111
|
-
experience
|
|
112
|
-
specific_data
|
|
108
|
+
first_name?: string | null;
|
|
109
|
+
last_name?: string | null;
|
|
110
|
+
number?: string | number | null;
|
|
111
|
+
position?: string | null;
|
|
112
|
+
experience?: string | null;
|
|
113
|
+
specific_data?: RosterPlayerSpecificData | null;
|
|
113
114
|
}
|
|
114
115
|
/** Per-league roster column set, identical in both apps -- see RECONCILIATION.md. */
|
|
115
116
|
declare function getRosterColumns(leagueId: number): RosterColumnDef[];
|
|
@@ -181,14 +182,7 @@ interface RosterSort {
|
|
|
181
182
|
id: string;
|
|
182
183
|
desc: boolean;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
first_name: string | null;
|
|
186
|
-
last_name: string | null;
|
|
187
|
-
number: string | number | null;
|
|
188
|
-
position: string | null;
|
|
189
|
-
experience: string | null;
|
|
190
|
-
specific_data: RosterPlayerSpecificData | null;
|
|
191
|
-
}
|
|
185
|
+
type SortableRosterPlayer = RosterPlayerLike;
|
|
192
186
|
/** Sorts roster players by the first active sort; missing values always last. See RECONCILIATION.md. */
|
|
193
187
|
declare function sortTeamPlayers<T extends SortableRosterPlayer>(players: T[], sorting: RosterSort[], leagueId?: number): T[];
|
|
194
188
|
|
package/dist/index.d.ts
CHANGED
|
@@ -103,13 +103,14 @@ interface RosterColumnDef {
|
|
|
103
103
|
key: RosterColumnKey;
|
|
104
104
|
label: string;
|
|
105
105
|
}
|
|
106
|
+
/** Optional-or-null throughout so an app's own `Player` type (optional fields) satisfies it directly. */
|
|
106
107
|
interface RosterPlayerLike {
|
|
107
|
-
first_name
|
|
108
|
-
last_name
|
|
109
|
-
number
|
|
110
|
-
position
|
|
111
|
-
experience
|
|
112
|
-
specific_data
|
|
108
|
+
first_name?: string | null;
|
|
109
|
+
last_name?: string | null;
|
|
110
|
+
number?: string | number | null;
|
|
111
|
+
position?: string | null;
|
|
112
|
+
experience?: string | null;
|
|
113
|
+
specific_data?: RosterPlayerSpecificData | null;
|
|
113
114
|
}
|
|
114
115
|
/** Per-league roster column set, identical in both apps -- see RECONCILIATION.md. */
|
|
115
116
|
declare function getRosterColumns(leagueId: number): RosterColumnDef[];
|
|
@@ -181,14 +182,7 @@ interface RosterSort {
|
|
|
181
182
|
id: string;
|
|
182
183
|
desc: boolean;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
first_name: string | null;
|
|
186
|
-
last_name: string | null;
|
|
187
|
-
number: string | number | null;
|
|
188
|
-
position: string | null;
|
|
189
|
-
experience: string | null;
|
|
190
|
-
specific_data: RosterPlayerSpecificData | null;
|
|
191
|
-
}
|
|
185
|
+
type SortableRosterPlayer = RosterPlayerLike;
|
|
192
186
|
/** Sorts roster players by the first active sort; missing values always last. See RECONCILIATION.md. */
|
|
193
187
|
declare function sortTeamPlayers<T extends SortableRosterPlayer>(players: T[], sorting: RosterSort[], leagueId?: number): T[];
|
|
194
188
|
|