Skip to content

Commit

Permalink
Export item types individually
Browse files Browse the repository at this point in the history
  • Loading branch information
leydel committed Jun 24, 2023
1 parent 1ae7cff commit 31c12d6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rlss-gg/items",
"version": "1.7.1",
"version": "1.7.2",
"description": "RL Sideswipe items database an an NPM package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
77 changes: 44 additions & 33 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
import * as Avatar from "./items/Avatar"
import * as Banner from "./items/Banner"
import * as Body from "./items/Body"
import * as Decal from "./items/Decal"
import * as GoalExplosion from "./items/GoalExplosion"
import * as RocketBoost from "./items/RocketBoost"
import * as Sticker from "./items/Sticker"
import * as Title from "./items/Title"
import * as Topper from "./items/Topper"
import * as Wheel from "./items/Wheel"
import * as Constructor from "./items/BaseItem"
import * as Avatars from "./items/Avatar"
import * as Banners from "./items/Banner"
import * as Bodys from "./items/Body"
import * as Decals from "./items/Decal"
import * as GoalExplosions from "./items/GoalExplosion"
import * as RocketBoosts from "./items/RocketBoost"
import * as Stickers from "./items/Sticker"
import * as Titles from "./items/Title"
import * as Toppers from "./items/Topper"
import * as Wheels from "./items/Wheel"
import * as Constructors from "./items/BaseItem"

// Items
export const avatars = Avatar
export const banners = Banner
export const bodies = Body
export const decals = Decal
export const goalExplosions = GoalExplosion
export const rocketBoosts = RocketBoost
export const stickers = Sticker
export const titles = Title
export const toppers = Topper
export const wheels = Wheel
export const avatars = Avatars
export const banners = Banners
export const bodies = Bodys
export const decals = Decals
export const goalExplosions = GoalExplosions
export const rocketBoosts = RocketBoosts
export const stickers = Stickers
export const titles = Titles
export const toppers = Toppers
export const wheels = Wheels

// Constructors
export const constructors = Constructor
export type ItemType =
| Constructor.Avatar
| Constructor.Banner
| Constructor.Body
| Constructor.Decal
| Constructor.GoalExplosion
| Constructor.RocketBoost
| Constructor.Sticker
| Constructor.Title
| Constructor.Topper
| Constructor.Wheel
export const constructors = Constructors

// Endpoints
export const endpoint = "https://cdn.rlss.gg/assets/items"

// Types
export * from "./types/Game"
export * from "./types/Item"

export type Avatar = Constructors.Avatar
export type Banner = Constructors.Banner
export type Body = Constructors.Body
export type Decal = Constructors.Decal
export type GoalExplosion = Constructors.GoalExplosion
export type RocketBoost = Constructors.RocketBoost
export type Sticker = Constructors.Sticker
export type Title = Constructors.Title
export type Topper = Constructors.Topper
export type Wheel = Constructors.Wheel
export type ItemType =
| Avatar
| Banner
| Body
| Decal
| GoalExplosion
| RocketBoost
| Sticker
| Title
| Topper
| Wheel

0 comments on commit 31c12d6

Please sign in to comment.