|
| 1 | +/** @deprecated */ |
1 | 2 | export class CustomType {
|
| 3 | + /** @deprecated */ |
2 | 4 | withFields<K extends keyof this>(fields: { [P in K]: this[P] }): this;
|
3 | 5 | }
|
4 | 6 |
|
5 |
| -export class List<T> implements Iterable<T> { |
| 7 | +export interface List<T> { |
| 8 | + readonly __gleam: unique symbol; |
| 9 | + |
| 10 | + /** @deprecated */ |
6 | 11 | head?: T;
|
| 12 | + /** @deprecated */ |
7 | 13 | tail?: List<T>;
|
8 |
| - static fromArray<T>(array: Array<T>): List<T>; |
| 14 | + /** @deprecated */ |
9 | 15 | toArray(): Array<T>;
|
| 16 | + /** @deprecated */ |
10 | 17 | atLeastLength(desired: number): boolean;
|
| 18 | + /** @deprecated */ |
11 | 19 | hasLength(desired: number): boolean;
|
| 20 | + /** @deprecated */ |
12 | 21 | countLength(): number;
|
13 |
| - |
| 22 | + /** @deprecated */ |
14 | 23 | [Symbol.iterator](): Iterator<T>;
|
15 | 24 | }
|
| 25 | +/** @deprecated */ |
| 26 | +export const List: { |
| 27 | + /** @deprecated */ |
| 28 | + new <T>(): List<T>; |
| 29 | + /** @deprecated */ |
| 30 | + fromArray<T>(array: Array<T>): List<T>; |
| 31 | +} |
| 32 | +export function List$Empty<T>(): List<T>; |
| 33 | +export function List$NonEmpty<T>(head: T, tail: List<T>): List<T>; |
| 34 | +export function List$isEmpty<T>(list: List<T>): boolean; |
| 35 | +export function List$isNonEmpty<T>(list: List<T>): boolean; |
| 36 | +export function List$NonEmpty$first<T>(list: List<T>): T | undefined; |
| 37 | +export function List$NonEmpty$rest<T>(list: List<T>): List<T> | undefined; |
| 38 | +/** @deprecated */ |
| 39 | +export class Empty<T = never> extends List<T> { } |
| 40 | +/** @deprecated */ |
| 41 | +export class NonEmpty<T> extends List<T> { } |
| 42 | + |
| 43 | +export interface BitArray { |
| 44 | + readonly __gleam: unique symbol; |
16 | 45 |
|
17 |
| -export function prepend<T>(element: T, tail: List<T>): List<T>; |
18 |
| -export function toList<T>(array: Array<T>): List<T>; |
19 |
| - |
20 |
| -export class Empty<T = never> extends List<T> {} |
21 |
| - |
22 |
| -export class NonEmpty<T> extends List<T> {} |
23 |
| - |
24 |
| -export class BitArray { |
| 46 | + /** @deprecated */ |
25 | 47 | bitSize: number;
|
| 48 | + /** @deprecated */ |
26 | 49 | byteSize: number;
|
| 50 | + /** @deprecated */ |
27 | 51 | bitOffset: number;
|
| 52 | + /** @deprecated */ |
28 | 53 | rawBuffer: Uint8Array;
|
29 |
| - |
30 |
| - constructor(buffer: Uint8Array, bitSize?: number, bitOffset?: number); |
31 |
| - |
| 54 | + /** @deprecated */ |
| 55 | + constructor(buffer: Uint8Array, bitSize?: number, bitOffset?: number): BitArray; |
| 56 | + /** @deprecated */ |
32 | 57 | byteAt(index: number): number;
|
33 |
| - |
34 |
| - /** @internal */ |
| 58 | + /** @deprecated */ |
35 | 59 | equals(other: BitArray): boolean;
|
36 |
| - |
37 | 60 | /** @deprecated */
|
38 | 61 | get buffer(): Uint8Array;
|
39 |
| - |
40 | 62 | /** @deprecated */
|
41 | 63 | get length(): number;
|
42 | 64 | }
|
43 |
| - |
44 |
| -export class UtfCodepoint { |
| 65 | +/** @deprecated */ |
| 66 | +export const BitArray: { |
| 67 | + /** @deprecated */ |
| 68 | + new(buffer: Uint8Array, bitSize?: number, bitOffset?: number); |
| 69 | +} |
| 70 | +export function BitArray$BitArray( |
| 71 | + buffer: Uint8Array, |
| 72 | + bitSize: number, |
| 73 | + bitOffset: number, |
| 74 | +): BitArray; |
| 75 | + |
| 76 | +export interface UtfCodepoint { |
| 77 | + readonly __gleam: unique symbol; |
| 78 | + /** @deprecated */ |
45 | 79 | value: string;
|
46 | 80 | }
|
| 81 | +/** @deprecated */ |
| 82 | +export const UtfCodepoint: { |
| 83 | + /** @deprecated */ |
| 84 | + new(value: string): UtfCodepoint |
| 85 | +} |
47 | 86 |
|
| 87 | +export interface Result<T, E> { |
| 88 | + readonly __gleam: unique symbol; |
| 89 | + /** @deprecated */ |
| 90 | + isOk(): boolean; |
| 91 | +} |
| 92 | +/** @deprecated */ |
| 93 | +export const Result: { |
| 94 | + new <T, E>(): Result<T, E> |
| 95 | +} |
| 96 | +export function Result$Ok<T, E>(value: T): Result<T, E>; |
| 97 | +export function Result$Error<T, E>(error: E): Result<T, E>; |
| 98 | +export function Result$isError<T, E>(result: Result<T, E>): boolean; |
| 99 | +export function Result$isOk<T, E>(result: Result<T, E>): boolean; |
| 100 | +export function Result$Ok$0<T, E>(result: Result<T, E>): T | undefined; |
| 101 | +export function Result$Error$0<T, E>(result: Result<T, E>): E | undefined; |
| 102 | +/** @deprecated */ |
| 103 | +export class Ok<T, E> extends Result<T, E> { |
| 104 | + /** @deprecated */ |
| 105 | + 0: T; |
| 106 | + /** @deprecated */ |
| 107 | + constructor(value: T); |
| 108 | + /** @deprecated */ |
| 109 | + static isResult(data: unknown): boolean; |
| 110 | +} |
| 111 | +/** @deprecated */ |
| 112 | +export class Error<T, E> extends Result<T, E> { |
| 113 | + /** @deprecated */ |
| 114 | + 0: E; |
| 115 | + /** @deprecated */ |
| 116 | + constructor(value: E); |
| 117 | + /** @deprecated */ |
| 118 | + static isResult(data: unknown): boolean; |
| 119 | +} |
| 120 | + |
| 121 | +/** @deprecated */ |
| 122 | +export function prepend<T>(element: T, tail: List<T>): List<T>; |
| 123 | +/** @deprecated */ |
| 124 | +export function toList<T>(array: Array<T>): List<T>; |
| 125 | + |
| 126 | +/** @deprecated */ |
48 | 127 | export function toBitArray(segments: Array<BitArray | Uint8Array | number>): BitArray;
|
49 | 128 |
|
| 129 | +/** @deprecated */ |
50 | 130 | export function sizedInt(
|
| 131 | + /** @deprecated */ |
51 | 132 | value: number,
|
| 133 | + /** @deprecated */ |
52 | 134 | size: number,
|
| 135 | + /** @deprecated */ |
53 | 136 | isBigEndian: boolean
|
54 | 137 | ): Uint8Array | BitArray;
|
55 | 138 |
|
| 139 | +/** @deprecated */ |
56 | 140 | export function stringBits(string: string): Uint8Array;
|
57 | 141 |
|
| 142 | +/** @deprecated */ |
58 | 143 | export function codepointBits(codepoint: UtfCodepoint): Uint8Array;
|
59 | 144 |
|
| 145 | +/** @deprecated */ |
60 | 146 | export function sizedFloat(
|
61 | 147 | value: number,
|
62 | 148 | size: number,
|
63 | 149 | isBigEndian: boolean
|
64 | 150 | ): Uint8Array;
|
65 | 151 |
|
66 |
| -export class Result<T, E> extends CustomType { |
67 |
| - static isResult(data: unknown): boolean; |
68 |
| - isOk(): boolean; |
69 |
| -} |
70 |
| - |
71 |
| -export class Ok<T, E> extends Result<T, E> { |
72 |
| - 0: T; |
73 |
| - constructor(value: T); |
74 |
| -} |
75 |
| - |
76 |
| -export class Error<T, E> extends Result<T, E> { |
77 |
| - 0: E; |
78 |
| - constructor(value: E); |
79 |
| -} |
80 |
| - |
| 152 | +/** @deprecated */ |
81 | 153 | export function isEqual(a: any, b: any): boolean;
|
82 | 154 |
|
| 155 | +/** @deprecated */ |
83 | 156 | export function remainderInt(a: number, b: number): number;
|
84 | 157 |
|
| 158 | +/** @deprecated */ |
85 | 159 | export function divideInt(a: number, b: number): number;
|
86 | 160 |
|
| 161 | +/** @deprecated */ |
87 | 162 | export function divideFloat(a: number, b: number): number;
|
0 commit comments