Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Remove deprecated items in buffer module #111

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 1 addition & 62 deletions app/current/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,68 +12,7 @@ import scala.scalajs.js.|
*/
@js.native
@JSImport("buffer", "Buffer")
class Buffer protected () extends Uint8Array( /* dummy to trick constructor */ -1) {

/////////////////////////////////////////////////////////////////////////////////
// Constructors
/////////////////////////////////////////////////////////////////////////////////

/**
* Use [[Buffer.alloc()]] instead.
*
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_size]]
*/
@inline
@deprecated("Use Buffer.alloc(size) instead.", since = "Node.js v6.0.0")
def this(size: Int) = this()

/**
* Use [[Buffer.from(str,encoding)]] instead.
*
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_string_encoding]]
*/
@inline
@deprecated("Use Buffer.from(str[, encoding]) instead.", since = "Node.js v6.0.0")
def this(str: String) = this()

/**
* Use [[Buffer.from(str,encoding)]] instead.
*
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_string_encoding]]
*/
@inline
@deprecated("Use Buffer.from(str[, encoding]) instead.", since = "Node.js v6.0.0")
def this(str: String, encoding: String) = this()

/**
* Use [[Buffer.from(array)]] instead.
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_array]]
*/
@inline
@deprecated("Use Buffer.from(array) instead.", since = "Node.js v6.0.0")
def this(array: js.Array[Int]) = this()

/**
* Use [[Buffer.from(buffer)]] instead.
*
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_buffer]]
*/
@inline
@deprecated("Use Buffer.from(buffer) instead.", since = "Node.js v6.0.0")
def this(buffer: Buffer) = this()

/**
* Use [[Buffer.from(arrayBuffer,byteOffset,length)]] instead.
*
* @see [[https://nodejs.org/api/buffer.html#buffer_new_buffer_arraybuffer_byteoffset_length]]
*/
@inline
@deprecated("Use Buffer.from(arrayBuffer[, byteOffset [, length]]) instead.", since = "Node.js v6.0.0")
def this(arrayBuffer: ArrayBuffer, byteOffset: Int = js.native, length: Int = js.native) = this()

/////////////////////////////////////////////////////////////////////////////////
// Accessors and Mutators
/////////////////////////////////////////////////////////////////////////////////
class Buffer private[this] () extends Uint8Array( /* dummy to trick constructor */ -1) {

/**
* The index operator `[index]` can be used to get and set the octet at position `index` in `buf`.
Expand Down

This file was deleted.