File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 55It assumes that the target platform supports JavaScript's ` WeakRef ` and ` FinalizationRegistry ` , which are becoming standard in ECMAScript 2021.
66Attempts to use ` WeakReference ` or ` ReferenceQueue ` will throw ` ReferenceError ` s if they are not supported.
77
8+ ## Usage
9+
10+ Add the following dependency to your project settings:
11+
12+ ``` scala
13+ libraryDependencies += " org.scala-js" %%% " scalajs-weakreferences" % " 1.0.0-SNAPSHOT"
14+ ```
15+
16+ When using a ` crossProject ` , add the above in ` .jsSettings(...) ` .
17+
18+ You can then use ` java.lang.ref.WeakReference ` and ` java.lang.ref.ReferenceQueue ` .
19+
820## License
921
1022` scalajs-weakreferences ` is distributed under the [ Apache 2.0 license] ( ./LICENSE.txt ) , like Scala.js itself.
You can’t perform that action at this time.
0 commit comments