Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Resource

github-actions[bot] edited this page Aug 11, 2023 · 51 revisions

Class: Resource<T>

Type parameters

Name Type
T extends ResourceType

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Resource<T>(hue, data)

Type parameters

Name Type
T extends ResourceType

Parameters

Name Type
hue Hue
data ResourceTypeGet<T>

Defined in

src/structures/Resource.ts:64

Properties

data

data: ResourceTypeGet<T>

Defined in

src/structures/Resource.ts:54


hue

Readonly hue: Hue

Defined in

src/structures/Resource.ts:51


manager

Readonly Abstract manager: Manager<T>

Defined in

src/structures/Resource.ts:53


type

Readonly Abstract type: ResourceType

Defined in

src/structures/Resource.ts:52

Accessors

id

get id(): string

Returns

string

Defined in

src/structures/Resource.ts:56


identifier

get identifier(): ResourceIdentifier<ResourceType>

Returns

ResourceIdentifier<ResourceType>

Defined in

src/structures/Resource.ts:60

Methods

_clone

_clone(): Resource<T>

Returns

Resource<T>

Defined in

src/structures/Resource.ts:77


_patch

_patch(data): void

Parameters

Name Type
data Partial<ResourceTypeGet<T>>

Returns

void

Defined in

src/structures/Resource.ts:73


_update

_update(data): Resource<T>

Parameters

Name Type
data Partial<ResourceTypeGet<T>>

Returns

Resource<T>

Defined in

src/structures/Resource.ts:81


isType

isType<T>(type): this is NarrowResource<T>

Type parameters

Name Type
T extends ResourceType

Parameters

Name Type
type T

Returns

this is NarrowResource<T>

Defined in

src/structures/Resource.ts:69

hue.ts

Clone this wiki locally