Skip to content

Commit eaaf346

Browse files
authored
Merge pull request #1321 from ibaryshnikov/master
Fixed typo in .slice for typed arrays
2 parents e84b327 + fa0a361 commit eaaf346

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/js-sys/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ extern "C" {
831831
/// array into a new typed array object. This method has the same algorithm
832832
/// as `Array.prototype.slice()`.
833833
#[wasm_bindgen(method)]
834-
pub fn slice(this: &Float32Array, begin: u32, end: u32) -> Uint8ClampedArray;
834+
pub fn slice(this: &Float32Array, begin: u32, end: u32) -> Float32Array;
835835

836836
/// The `forEach()` method executes a provided function once per array
837837
/// element. This method has the same algorithm as
@@ -920,7 +920,7 @@ extern "C" {
920920
/// array into a new typed array object. This method has the same algorithm
921921
/// as `Array.prototype.slice()`.
922922
#[wasm_bindgen(method)]
923-
pub fn slice(this: &Float64Array, begin: u32, end: u32) -> Uint8ClampedArray;
923+
pub fn slice(this: &Float64Array, begin: u32, end: u32) -> Float64Array;
924924

925925
/// The `forEach()` method executes a provided function once per array
926926
/// element. This method has the same algorithm as
@@ -1144,7 +1144,7 @@ extern "C" {
11441144
/// array into a new typed array object. This method has the same algorithm
11451145
/// as `Array.prototype.slice()`.
11461146
#[wasm_bindgen(method)]
1147-
pub fn slice(this: &Int8Array, begin: u32, end: u32) -> Uint8ClampedArray;
1147+
pub fn slice(this: &Int8Array, begin: u32, end: u32) -> Int8Array;
11481148

11491149
/// The `forEach()` method executes a provided function once per array
11501150
/// element. This method has the same algorithm as
@@ -1233,7 +1233,7 @@ extern "C" {
12331233
/// array into a new typed array object. This method has the same algorithm
12341234
/// as `Array.prototype.slice()`.
12351235
#[wasm_bindgen(method)]
1236-
pub fn slice(this: &Int16Array, begin: u32, end: u32) -> Uint8ClampedArray;
1236+
pub fn slice(this: &Int16Array, begin: u32, end: u32) -> Int16Array;
12371237

12381238
/// The `forEach()` method executes a provided function once per array
12391239
/// element. This method has the same algorithm as
@@ -1322,7 +1322,7 @@ extern "C" {
13221322
/// array into a new typed array object. This method has the same algorithm
13231323
/// as `Array.prototype.slice()`.
13241324
#[wasm_bindgen(method)]
1325-
pub fn slice(this: &Int32Array, begin: u32, end: u32) -> Uint8ClampedArray;
1325+
pub fn slice(this: &Int32Array, begin: u32, end: u32) -> Int32Array;
13261326

13271327
/// The `forEach()` method executes a provided function once per array
13281328
/// element. This method has the same algorithm as
@@ -3111,7 +3111,7 @@ extern "C" {
31113111
/// array into a new typed array object. This method has the same algorithm
31123112
/// as `Array.prototype.slice()`.
31133113
#[wasm_bindgen(method)]
3114-
pub fn slice(this: &Uint8Array, begin: u32, end: u32) -> Uint8ClampedArray;
3114+
pub fn slice(this: &Uint8Array, begin: u32, end: u32) -> Uint8Array;
31153115

31163116
/// The `forEach()` method executes a provided function once per array
31173117
/// element. This method has the same algorithm as
@@ -3291,7 +3291,7 @@ extern "C" {
32913291
/// array into a new typed array object. This method has the same algorithm
32923292
/// as `Array.prototype.slice()`.
32933293
#[wasm_bindgen(method)]
3294-
pub fn slice(this: &Uint16Array, begin: u32, end: u32) -> Uint8ClampedArray;
3294+
pub fn slice(this: &Uint16Array, begin: u32, end: u32) -> Uint16Array;
32953295

32963296
/// The `forEach()` method executes a provided function once per array
32973297
/// element. This method has the same algorithm as
@@ -3380,7 +3380,7 @@ extern "C" {
33803380
/// array into a new typed array object. This method has the same algorithm
33813381
/// as `Array.prototype.slice()`.
33823382
#[wasm_bindgen(method)]
3383-
pub fn slice(this: &Uint32Array, begin: u32, end: u32) -> Uint8ClampedArray;
3383+
pub fn slice(this: &Uint32Array, begin: u32, end: u32) -> Uint32Array;
33843384

33853385
/// The `forEach()` method executes a provided function once per array
33863386
/// element. This method has the same algorithm as

0 commit comments

Comments
 (0)