aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-01-12 18:41:49 +0530
committerAkshay Nair <phenax5@gmail.com>2023-01-12 18:41:49 +0530
commita107048f87828b87b3bd55db1b6217710c40ee84 (patch)
tree2aa04a13f0d2987cc3eb7efe979d77834e2b57ce /stdlib
parent3020be98876613b19dcc79f6cc8cade12460ba48 (diff)
downloadts-types-lang-a107048f87828b87b3bd55db1b6217710c40ee84.tar.gz
ts-types-lang-a107048f87828b87b3bd55db1b6217710c40ee84.zip
feat: adds mutable reference effects
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/ref.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/stdlib/ref.ts b/stdlib/ref.ts
new file mode 100644
index 0000000..22650f7
--- /dev/null
+++ b/stdlib/ref.ts
@@ -0,0 +1,14 @@
+import { Effect } from './effect'
+
+// TODO: Make Ref opaque
+// declare const $ref: unique symbol
+
+export type Ref = string // & { [$ref]: true }
+
+export interface CreateRef<_Val> extends Effect<Ref> {}
+
+export interface GetRef<_Key extends Ref> extends Effect {}
+
+export interface SetRef<_Key extends Ref, _Val> extends Effect {}
+
+export interface DeleteRef<_Key extends Ref> extends Effect {}