@@ -131,8 +131,10 @@ declare namespace i8 {
131
131
export const MAX_VALUE : i8 ;
132
132
/** Converts a string to a floating-point number and cast to target integer after. */
133
133
export function parseFloat ( string : string ) : i8 ;
134
- /** Converts A string to an integer. */
134
+ /** Parses a string as an integer. */
135
135
export function parseInt ( string : string , radix ?: i32 ) : i8 ;
136
+ /** Parses a string as an i8. */
137
+ export function parse ( value : string , radix ?: i32 ) : i8 ;
136
138
}
137
139
/** Converts any other numeric value to a 16-bit signed integer. */
138
140
declare function i16 ( value : any ) : i16 ;
@@ -143,8 +145,10 @@ declare namespace i16 {
143
145
export const MAX_VALUE : i16 ;
144
146
/** Converts a string to a floating-point number and cast to target integer after. */
145
147
export function parseFloat ( string : string ) : i16 ;
146
- /** Converts A string to an integer. */
148
+ /** Parses a string as an integer. */
147
149
export function parseInt ( string : string , radix ?: i32 ) : i16 ;
150
+ /** Parses a string as an i16. */
151
+ export function parse ( value : string , radix ?: i32 ) : i16 ;
148
152
}
149
153
/** Converts any other numeric value to a 32-bit signed integer. */
150
154
declare function i32 ( value : any ) : i32 ;
@@ -155,8 +159,10 @@ declare namespace i32 {
155
159
export const MAX_VALUE : i32 ;
156
160
/** Converts a string to a floating-point number and cast to target integer after. */
157
161
export function parseFloat ( string : string ) : i32 ;
158
- /** Converts A string to an integer. */
162
+ /** Parses a string as an integer. */
159
163
export function parseInt ( string : string , radix ?: i32 ) : i32 ;
164
+ /** Parses a string as an i32. */
165
+ export function parse ( value : string , radix ?: i32 ) : i32 ;
160
166
}
161
167
/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */
162
168
declare function isize ( value : any ) : isize ;
@@ -167,8 +173,10 @@ declare namespace isize {
167
173
export const MAX_VALUE : isize ;
168
174
/** Converts a string to a floating-point number and cast to target integer after. */
169
175
export function parseFloat ( string : string ) : isize ;
170
- /** Converts A string to an integer. */
176
+ /** Parses a string as an integer. */
171
177
export function parseInt ( string : string , radix ?: i32 ) : isize ;
178
+ /** Parses a string as an iszie. */
179
+ export function parse ( value : string , radix ?: i32 ) : isize ;
172
180
}
173
181
/** Converts any other numeric value to an 8-bit unsigned integer. */
174
182
declare function u8 ( value : any ) : u8 ;
@@ -179,8 +187,10 @@ declare namespace u8 {
179
187
export const MAX_VALUE : u8 ;
180
188
/** Converts a string to a floating-point number and cast to target integer after. */
181
189
export function parseFloat ( string : string ) : u8 ;
182
- /** Converts A string to an integer. */
190
+ /** Parses a string as an integer. */
183
191
export function parseInt ( string : string , radix ?: i32 ) : u8 ;
192
+ /** Parses a string as an u8. */
193
+ export function parse ( value : string , radix ?: i32 ) : u8 ;
184
194
}
185
195
/** Converts any other numeric value to a 16-bit unsigned integer. */
186
196
declare function u16 ( value : any ) : u16 ;
@@ -191,8 +201,10 @@ declare namespace u16 {
191
201
export const MAX_VALUE : u16 ;
192
202
/** Converts a string to a floating-point number and cast to target integer after. */
193
203
export function parseFloat ( string : string ) : u16 ;
194
- /** Converts A string to an integer. */
204
+ /** Parses a string as an integer. */
195
205
export function parseInt ( string : string , radix ?: i32 ) : u16 ;
206
+ /** Parses a string as an u16. */
207
+ export function parse ( value : string , radix ?: i32 ) : u16 ;
196
208
}
197
209
/** Converts any other numeric value to a 32-bit unsigned integer. */
198
210
declare function u32 ( value : any ) : u32 ;
@@ -203,8 +215,10 @@ declare namespace u32 {
203
215
export const MAX_VALUE : u32 ;
204
216
/** Converts a string to a floating-point number and cast to target integer after. */
205
217
export function parseFloat ( string : string ) : u32 ;
206
- /** Converts A string to an integer. */
218
+ /** Parses a string as an integer. */
207
219
export function parseInt ( string : string , radix ?: i32 ) : u32 ;
220
+ /** Parses a string as an u32. */
221
+ export function parse ( value : string , radix ?: i32 ) : u32 ;
208
222
}
209
223
/** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */
210
224
declare function usize ( value : any ) : isize ;
@@ -215,8 +229,10 @@ declare namespace usize {
215
229
export const MAX_VALUE : usize ;
216
230
/** Converts a string to a floating-point number and cast to target integer after. */
217
231
export function parseFloat ( string : string ) : usize ;
218
- /** Converts A string to an integer. */
232
+ /** Parses a string as an integer. */
219
233
export function parseInt ( string : string , radix ?: i32 ) : usize ;
234
+ /** Parses a string as an usize. */
235
+ export function parse ( value : string , radix ?: i32 ) : usize ;
220
236
}
221
237
/** Converts any other numeric value to a 1-bit unsigned integer. */
222
238
declare function bool ( value : any ) : bool ;
@@ -225,6 +241,8 @@ declare namespace bool {
225
241
export const MIN_VALUE : bool ;
226
242
/** Largest representable value. */
227
243
export const MAX_VALUE : bool ;
244
+ /** Parses a string as a bool. */
245
+ export function parse ( value : string ) : bool ;
228
246
}
229
247
/** Converts any other numeric value to a 32-bit float. */
230
248
declare function f32 ( value : any ) : f32 ;
@@ -258,8 +276,10 @@ declare namespace f32 {
258
276
export function isInteger ( value : f32 ) : bool ;
259
277
/** Converts a string to a floating-point number. */
260
278
export function parseFloat ( string : string ) : f32 ;
261
- /** Converts A string to an integer. */
279
+ /** Parses a string as an integer and convert to an f32 . */
262
280
export function parseInt ( string : string , radix ?: i32 ) : f32 ;
281
+ /** Parses a string as an f32. */
282
+ export function parse ( value : string ) : f32 ;
263
283
}
264
284
/** Converts any other numeric value to a 64-bit float. */
265
285
declare function f64 ( value : any ) : f64 ;
@@ -293,8 +313,10 @@ declare namespace f64 {
293
313
export function isInteger ( value : f64 ) : bool ;
294
314
/** Converts a string to a floating-point number. */
295
315
export function parseFloat ( string : string ) : f64 ;
296
- /** Converts A string to an integer. */
316
+ /** Parses a string as an integer and convert to an f64 . */
297
317
export function parseInt ( string : string , radix ?: i32 ) : f64 ;
318
+ /** Parses a string as an f64. */
319
+ export function parse ( value : string ) : f64 ;
298
320
}
299
321
300
322
// Standard library
0 commit comments