Skip to content

Commit eb1e28c

Browse files
committed
pr feedback
1 parent e5734fa commit eb1e28c

File tree

2 files changed

+39
-34
lines changed

2 files changed

+39
-34
lines changed

runtime/Stdlib_Symbol.res

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
type t
22

33
@val external make: string => t = "Symbol"
4-
@val external getFor: string => option<t> = "Symbol.for"
5-
@val external keyFor: t => option<string> = "Symbol.keyFor"
4+
@val @scope("Symbol")
5+
external getFor: string => option<t> = "for"
6+
@val @scope("Symbol") external keyFor: t => option<string> = "keyFor"
67
@get
78
external description: t => option<string> = "description"
89
@send external toString: t => string = "toString"
910

10-
@val external asyncIterator: t = "Symbol.asyncIterator"
11-
@val external hasInstance: t = "Symbol.hasInstance"
12-
@val external isConcatSpreadable: t = "Symbol.isConcatSpreadable"
13-
@val external iterator: t = "Symbol.iterator"
14-
@val external match: t = "Symbol.match"
15-
@val external matchAll: t = "Symbol.matchAll"
16-
@val external replace: t = "Symbol.replace"
17-
@val external search: t = "Symbol.search"
18-
@val external species: t = "Symbol.species"
19-
@val external split: t = "Symbol.split"
20-
@val external toPrimitive: t = "Symbol.toPrimitive"
21-
@val external toStringTag: t = "Symbol.toStringTag"
22-
@val external unscopables: t = "Symbol.unscopables"
11+
@val @scope("Symbol")
12+
external asyncIterator: t = "asyncIterator"
13+
@val @scope("Symbol")
14+
external hasInstance: t = "hasInstance"
15+
@val @scope("Symbol") external isConcatSpreadable: t = "isConcatSpreadable"
16+
@val @scope("Symbol") external iterator: t = "iterator"
17+
@val @scope("Symbol") external match: t = "match"
18+
@val @scope("Symbol") external matchAll: t = "matchAll"
19+
@val @scope("Symbol") external replace: t = "replace"
20+
@val @scope("Symbol") external search: t = "search"
21+
@val @scope("Symbol") external species: t = "species"
22+
@val @scope("Symbol") external split: t = "split"
23+
@val @scope("Symbol") external toPrimitive: t = "toPrimitive"
24+
@val @scope("Symbol") external toStringTag: t = "toStringTag"
25+
@val @scope("Symbol") external unscopables: t = "unscopables"

runtime/Stdlib_Symbol.resi

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Makes a new unique Symbol value.
1717
## Examples
1818
1919
```rescript
20-
Symbol.make("sym1")->assetEqual("sym1")
20+
Symbol.make("sym1")->assertEqual("sym1")
2121
```
2222
*/
2323
@val
@@ -32,11 +32,12 @@ Otherwise a new Symbol gets created and registered with key.
3232
## Examples
3333
3434
```rescript
35-
Symbol.getFor("sym1")->assetEqual(Symbol.getFor("sym1"))
35+
Symbol.getFor("sym1")->assertEqual(Symbol.getFor("sym1"))
3636
```
3737
*/
3838
@val
39-
external getFor: string => t = "Symbol.for"
39+
@scope("Symbol")
40+
external getFor: string => option<t> = "for"
4041

4142
/**
4243
`keyFor(key)`
@@ -56,7 +57,8 @@ Symbol.keyFor(localSym)->assertEqual(None)
5657
```
5758
*/
5859
@val
59-
external keyFor: t => option<string> = "Symbol.keyFor"
60+
@scope("Symbol")
61+
external keyFor: t => option<string> = "keyFor"
6062

6163
/**
6264
`description`
@@ -88,18 +90,18 @@ Symbol.toString(sym)->assertEqual("Symbol(sym1)")
8890
@send
8991
external toString: t => string = "toString"
9092

91-
@val
92-
external asyncIterator: t = "Symbol.asyncIterator"
93-
@val
94-
external hasInstance: t = "Symbol.hasInstance"
95-
@val external isConcatSpreadable: t = "Symbol.isConcatSpreadable"
96-
@val external iterator: t = "Symbol.iterator"
97-
@val external match: t = "Symbol.match"
98-
@val external matchAll: t = "Symbol.matchAll"
99-
@val external replace: t = "Symbol.replace"
100-
@val external search: t = "Symbol.search"
101-
@val external species: t = "Symbol.species"
102-
@val external split: t = "Symbol.split"
103-
@val external toPrimitive: t = "Symbol.toPrimitive"
104-
@val external toStringTag: t = "Symbol.toStringTag"
105-
@val external unscopables: t = "Symbol.unscopables"
93+
@val @scope("Symbol")
94+
external asyncIterator: t = "asyncIterator"
95+
@val @scope("Symbol")
96+
external hasInstance: t = "hasInstance"
97+
@val @scope("Symbol") external isConcatSpreadable: t = "isConcatSpreadable"
98+
@val @scope("Symbol") external iterator: t = "iterator"
99+
@val @scope("Symbol") external match: t = "match"
100+
@val @scope("Symbol") external matchAll: t = "matchAll"
101+
@val @scope("Symbol") external replace: t = "replace"
102+
@val @scope("Symbol") external search: t = "search"
103+
@val @scope("Symbol") external species: t = "species"
104+
@val @scope("Symbol") external split: t = "split"
105+
@val @scope("Symbol") external toPrimitive: t = "toPrimitive"
106+
@val @scope("Symbol") external toStringTag: t = "toStringTag"
107+
@val @scope("Symbol") external unscopables: t = "unscopables"

0 commit comments

Comments
 (0)