Class

Class

Class(arg1, arg2)

Constructor

# new Class(arg1, arg2)

This class provides an implementation of the Interface contract with additional static functionality. It manages an internal state through a private property and offers both instance and static methods.

A class implementing the Interface contract.

sequenceDiagram participant Client participant Instance participant Static Client->>Instance: new Class(arg1, arg2) activate Instance Instance-->>Client: class instance deactivate Instance Client->>Instance: method() activate Instance Instance-->>Client: Promise deactivate Instance Client->>Static: Class.method() activate Static Static-->>Client: void deactivate Static
Parameters:
Name Type Description
arg1 unknown

First argument of unknown type

arg2 string

Second argument as string

Implements:

View Source namespace/Class.ts, line 2

Example
```typescript
// Create a new instance
const instance = new Class('someValue', 'stringValue');

// Using the generic method
await instance.method<string>()
  .catch(error => console.error(error));

// Using the static method
Class.method();
```

Methods

# async method() → {Promise.<string>}

Throws an error with type casting chain.

Asynchronous method implementing the Interface contract.

Implements:

View Source namespace/Class.ts, line 103

Always throws an error

Error

A Promise that always rejects with an error

Promise.<string>

# static method() → {never}

A static utility method that always throws an error.

Static method that throws an error.

View Source namespace/Class.ts, line 113

Always throws an error

Error

Never returns as it always throws an error

never