Skip to content

Commit

Permalink
Simpler examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderOMara committed Nov 20, 2024
1 parent 455389c commit ffde0ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Endianness can be defined for each individual member.
```ts
import { memberI8, memberU16, Struct } from '@hqtsm/struct';

export class Example extends Struct {
class Example extends Struct {
declare public readonly ['constructor']: typeof Example;

declare public alpha: number;
Expand Down Expand Up @@ -53,7 +53,7 @@ Using the endian passed into the constructor, or host endianness.
```ts
import { memberU16, Struct } from '@hqtsm/struct';

export class Example extends Struct {
class Example extends Struct {
declare public readonly ['constructor']: typeof Example;

declare public alpha: number;
Expand Down Expand Up @@ -87,7 +87,7 @@ Structures can be extended with new child members.
```ts
import { memberF32, memberU32, Struct } from '@hqtsm/struct';

export class Variable extends Struct {
class Variable extends Struct {
declare public readonly ['constructor']: typeof Variable;

declare public type: number;
Expand All @@ -98,7 +98,7 @@ export class Variable extends Struct {
})(super.BYTE_LENGTH);
}

export class VariableFloat extends Variable {
class VariableFloat extends Variable {
declare public readonly ['constructor']: typeof VariableFloat;

declare public value: number;
Expand All @@ -125,7 +125,7 @@ Casting the name to `never` or `any` will pass the type checker.
```ts
import { memberU8, Struct } from '@hqtsm/struct';

export class Example extends Struct {
class Example extends Struct {
declare public readonly ['constructor']: typeof Example;

declare private alpha: number;
Expand Down

0 comments on commit ffde0ef

Please sign in to comment.