File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import cheerio from "cheerio"
3
3
4
4
import { dynamicLinks } from "../endpoints/endpoints"
5
5
6
- interface constructorStanding {
6
+ type constructorStanding = {
7
7
position : number
8
8
team : string
9
9
points : number
10
10
}
11
11
12
- export const getConstructorStandings = ( year : number ) : Promise < constructorStanding [ ] > => {
12
+ export const getConstructorStandings = ( year : number = new Date ( ) . getFullYear ( ) ) : Promise < constructorStanding [ ] > => {
13
13
14
14
let constructorStandings : constructorStanding [ ] = [ ]
15
15
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import cheerio from 'cheerio'
3
3
4
4
import { staticLinks } from "../endpoints/endpoints" ;
5
5
6
- interface drivers {
6
+ type drivers = {
7
7
name : string
8
8
team : string
9
9
rank : number
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import cheerio from "cheerio"
3
3
4
4
import { dynamicLinks } from "../endpoints/endpoints"
5
5
6
- interface driverStanding {
6
+ type driverStanding = {
7
7
position : number
8
8
driver : string
9
9
nationality : string
10
10
team : string
11
11
points : number
12
12
}
13
13
14
- export const getDriverStandings = ( year : number ) : Promise < driverStanding [ ] > => {
14
+ export const getDriverStandings = ( year : number = new Date ( ) . getFullYear ( ) ) : Promise < driverStanding [ ] > => {
15
15
16
16
let driverStandings : driverStanding [ ] = [ ]
17
17
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import cheerio from "cheerio"
3
3
4
4
import { staticLinks } from "../endpoints/endpoints" ;
5
5
6
- interface teams {
6
+ type teams = {
7
7
name : string
8
8
drivers : string [ ]
9
9
points : number
You can’t perform that action at this time.
0 commit comments