Skip to content

Commit 4e2a12a

Browse files
committed
Don't export Typed.part'
1 parent 051d43b commit 4e2a12a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/Data/ArrayBuffer/Typed.purs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module Data.ArrayBuffer.Typed
3434
, buffer, byteOffset, byteLength, length
3535
, compare, eq
3636
, class TypedArray
37-
, create, whole, remainder, part, part', empty, fromArray
37+
, create, whole, remainder, part, empty, fromArray
3838
, fill, set, setTyped, copyWithin
3939
, map, traverse, traverse_, filter
4040
, mapWithIndex, traverseWithIndex, traverseWithIndex_, filterWithIndex
@@ -137,6 +137,8 @@ part :: forall a t. TypedArray a t => BytesPerType a => ArrayBuffer -> Index ->
137137
part a x y = part' a o y
138138
where o = x * byteWidth (Proxy :: Proxy a)
139139

140+
-- | The ByteOffset must be aligned.
141+
-- | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#byteoffset_must_be_aligned
140142
part' :: forall a t. TypedArray a t => ArrayBuffer -> ByteOffset -> Length -> Effect (ArrayView a)
141143
part' a x y = runEffectFn3 create a (notNull x) (notNull y)
142144

0 commit comments

Comments
 (0)