This repository was archived by the owner on Jul 30, 2024. It is now read-only.
File tree 2 files changed +6
-5
lines changed
app/current/src/main/scala/io/scalajs/nodejs 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ The following core Node.js modules (v8.7.0+) have been implemented:
41
41
| [ readline] ( https://nodejs.org/api/readline.html ) | |
42
42
| [ repl] ( https://nodejs.org/api/repl.html ) | |
43
43
| [ stream] ( https://nodejs.org/api/stream.html ) | |
44
- | [ string-decoder] ( https://nodejs.org/api/string_decoder.html ) | |
44
+ | [ string-decoder] ( https://nodejs.org/api/string_decoder.html ) | : heavy_check_mark : |
45
45
| [ timers] ( https://nodejs.org/api/timers.html ) | :heavy_check_mark : |
46
46
| [ tty] ( https://nodejs.org/api/tty.html ) | |
47
47
| [ url] ( https://nodejs.org/api/url.html ) | :heavy_check_mark : |
Original file line number Diff line number Diff line change 1
1
package io .scalajs .nodejs
2
2
3
- import io .scalajs .nodejs .buffer .Buffer
4
3
import io .scalajs .nodejs .events .IEventEmitter
5
4
6
5
import scala .scalajs .js
7
6
import scala .scalajs .js .annotation .JSImport
7
+ import scala .scalajs .js .typedarray .{DataView , TypedArray }
8
+ import scala .scalajs .js .|
8
9
9
10
/**
10
11
* To use this module, do require('string_decoder'). StringDecoder decodes a buffer to a string. It is a simple
11
- * interface to [[ Buffer.toString() ]] but provides additional support for utf8.
12
+ * interface to Buffer.toString() but provides additional support for utf8.
12
13
*/
13
14
@ js.native
14
15
@ JSImport (" string_decoder" , " StringDecoder" )
@@ -18,12 +19,12 @@ class StringDecoder(encoding: String = js.native) extends IEventEmitter {
18
19
* Returns any trailing bytes that were left in the buffer.
19
20
* @example decoder.end()
20
21
*/
21
- def end (buffer : Buffer = js.native): String = js.native
22
+ def end (buffer : TypedArray [_, _] | DataView = js.native): String = js.native
22
23
23
24
/**
24
25
* Returns a decoded string.
25
26
* @example decoder.write(buffer)
26
27
*/
27
- def write (buffer : Buffer ): String = js.native
28
+ def write (buffer : TypedArray [_, _] | DataView ): String = js.native
28
29
29
30
}
You can’t perform that action at this time.
0 commit comments