@alloy-js/core 0.21.0-dev.3 → 0.21.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/binder.d.ts +3 -3
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +18 -4
- package/dist/src/binder.js.map +1 -1
- package/dist/src/components/ReferenceOrContent.d.ts +1 -1
- package/dist/src/components/ReferenceOrContent.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/library-symbol-reference.d.ts +8 -0
- package/dist/src/library-symbol-reference.d.ts.map +1 -0
- package/dist/src/library-symbol-reference.js +5 -0
- package/dist/src/library-symbol-reference.js.map +1 -0
- package/dist/src/refkey.d.ts +10 -8
- package/dist/src/refkey.d.ts.map +1 -1
- package/dist/src/refkey.js +34 -13
- package/dist/src/refkey.js.map +1 -1
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js +4 -3
- package/dist/src/render.js.map +1 -1
- package/dist/src/runtime/component.d.ts +2 -2
- package/dist/src/runtime/component.d.ts.map +1 -1
- package/dist/src/runtime/component.js.map +1 -1
- package/dist/src/symbols/output-symbol.d.ts +9 -0
- package/dist/src/symbols/output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/output-symbol.js +30 -0
- package/dist/src/symbols/output-symbol.js.map +1 -1
- package/dist/test/refkey.test.js +11 -1
- package/dist/test/refkey.test.js.map +1 -1
- package/dist/test/symbols/output-scope.test.js +4 -3
- package/dist/test/symbols/output-scope.test.js.map +1 -1
- package/dist/test/symbols/resolution.test.js +29 -1
- package/dist/test/symbols/resolution.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/binder.ts +34 -6
- package/src/index.ts +1 -0
- package/src/library-symbol-reference.ts +20 -0
- package/src/refkey.ts +57 -29
- package/src/render.ts +4 -3
- package/src/runtime/component.ts +2 -1
- package/src/symbols/output-symbol.ts +40 -0
- package/temp/api.json +447 -45
- package/test/refkey.test.ts +12 -1
- package/test/symbols/output-scope.test.ts +4 -4
- package/test/symbols/resolution.test.ts +42 -1
package/temp/api.json
CHANGED
|
@@ -1499,8 +1499,8 @@
|
|
|
1499
1499
|
},
|
|
1500
1500
|
{
|
|
1501
1501
|
"kind": "Reference",
|
|
1502
|
-
"text": "
|
|
1503
|
-
"canonicalReference": "@alloy-js/core!
|
|
1502
|
+
"text": "Refkeyable",
|
|
1503
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
1504
1504
|
},
|
|
1505
1505
|
{
|
|
1506
1506
|
"kind": "Content",
|
|
@@ -2238,6 +2238,15 @@
|
|
|
2238
2238
|
"text": "RenderableObject",
|
|
2239
2239
|
"canonicalReference": "@alloy-js/core!RenderableObject:interface"
|
|
2240
2240
|
},
|
|
2241
|
+
{
|
|
2242
|
+
"kind": "Content",
|
|
2243
|
+
"text": " | "
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
"kind": "Reference",
|
|
2247
|
+
"text": "RefkeyableObject",
|
|
2248
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
2249
|
+
},
|
|
2241
2250
|
{
|
|
2242
2251
|
"kind": "Content",
|
|
2243
2252
|
"text": " | string | boolean | number | undefined | null | void | (() => "
|
|
@@ -2293,7 +2302,7 @@
|
|
|
2293
2302
|
"name": "Child",
|
|
2294
2303
|
"typeTokenRange": {
|
|
2295
2304
|
"startIndex": 1,
|
|
2296
|
-
"endIndex":
|
|
2305
|
+
"endIndex": 14
|
|
2297
2306
|
}
|
|
2298
2307
|
},
|
|
2299
2308
|
{
|
|
@@ -9104,6 +9113,61 @@
|
|
|
9104
9113
|
],
|
|
9105
9114
|
"name": "isKeyedChild"
|
|
9106
9115
|
},
|
|
9116
|
+
{
|
|
9117
|
+
"kind": "Function",
|
|
9118
|
+
"canonicalReference": "@alloy-js/core!isLibrarySymbolReference:function(1)",
|
|
9119
|
+
"docComment": "",
|
|
9120
|
+
"excerptTokens": [
|
|
9121
|
+
{
|
|
9122
|
+
"kind": "Content",
|
|
9123
|
+
"text": "export declare function isLibrarySymbolReference(value: "
|
|
9124
|
+
},
|
|
9125
|
+
{
|
|
9126
|
+
"kind": "Content",
|
|
9127
|
+
"text": "unknown"
|
|
9128
|
+
},
|
|
9129
|
+
{
|
|
9130
|
+
"kind": "Content",
|
|
9131
|
+
"text": "): "
|
|
9132
|
+
},
|
|
9133
|
+
{
|
|
9134
|
+
"kind": "Reference",
|
|
9135
|
+
"text": "value",
|
|
9136
|
+
"canonicalReference": "@alloy-js/core!~value"
|
|
9137
|
+
},
|
|
9138
|
+
{
|
|
9139
|
+
"kind": "Content",
|
|
9140
|
+
"text": " is "
|
|
9141
|
+
},
|
|
9142
|
+
{
|
|
9143
|
+
"kind": "Reference",
|
|
9144
|
+
"text": "LibrarySymbolReference",
|
|
9145
|
+
"canonicalReference": "@alloy-js/core!LibrarySymbolReference:interface"
|
|
9146
|
+
},
|
|
9147
|
+
{
|
|
9148
|
+
"kind": "Content",
|
|
9149
|
+
"text": ";"
|
|
9150
|
+
}
|
|
9151
|
+
],
|
|
9152
|
+
"fileUrlPath": "src/library-symbol-reference.ts",
|
|
9153
|
+
"returnTypeTokenRange": {
|
|
9154
|
+
"startIndex": 3,
|
|
9155
|
+
"endIndex": 6
|
|
9156
|
+
},
|
|
9157
|
+
"releaseTag": "Public",
|
|
9158
|
+
"overloadIndex": 1,
|
|
9159
|
+
"parameters": [
|
|
9160
|
+
{
|
|
9161
|
+
"parameterName": "value",
|
|
9162
|
+
"parameterTypeTokenRange": {
|
|
9163
|
+
"startIndex": 1,
|
|
9164
|
+
"endIndex": 2
|
|
9165
|
+
},
|
|
9166
|
+
"isOptional": false
|
|
9167
|
+
}
|
|
9168
|
+
],
|
|
9169
|
+
"name": "isLibrarySymbolReference"
|
|
9170
|
+
},
|
|
9107
9171
|
{
|
|
9108
9172
|
"kind": "Function",
|
|
9109
9173
|
"canonicalReference": "@alloy-js/core!isMemberRefkey:function(1)",
|
|
@@ -9324,6 +9388,61 @@
|
|
|
9324
9388
|
],
|
|
9325
9389
|
"name": "isRefkey"
|
|
9326
9390
|
},
|
|
9391
|
+
{
|
|
9392
|
+
"kind": "Function",
|
|
9393
|
+
"canonicalReference": "@alloy-js/core!isRefkeyable:function(1)",
|
|
9394
|
+
"docComment": "",
|
|
9395
|
+
"excerptTokens": [
|
|
9396
|
+
{
|
|
9397
|
+
"kind": "Content",
|
|
9398
|
+
"text": "export declare function isRefkeyable(value: "
|
|
9399
|
+
},
|
|
9400
|
+
{
|
|
9401
|
+
"kind": "Content",
|
|
9402
|
+
"text": "unknown"
|
|
9403
|
+
},
|
|
9404
|
+
{
|
|
9405
|
+
"kind": "Content",
|
|
9406
|
+
"text": "): "
|
|
9407
|
+
},
|
|
9408
|
+
{
|
|
9409
|
+
"kind": "Reference",
|
|
9410
|
+
"text": "value",
|
|
9411
|
+
"canonicalReference": "@alloy-js/core!~value"
|
|
9412
|
+
},
|
|
9413
|
+
{
|
|
9414
|
+
"kind": "Content",
|
|
9415
|
+
"text": " is "
|
|
9416
|
+
},
|
|
9417
|
+
{
|
|
9418
|
+
"kind": "Reference",
|
|
9419
|
+
"text": "RefkeyableObject",
|
|
9420
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
9421
|
+
},
|
|
9422
|
+
{
|
|
9423
|
+
"kind": "Content",
|
|
9424
|
+
"text": ";"
|
|
9425
|
+
}
|
|
9426
|
+
],
|
|
9427
|
+
"fileUrlPath": "src/refkey.ts",
|
|
9428
|
+
"returnTypeTokenRange": {
|
|
9429
|
+
"startIndex": 3,
|
|
9430
|
+
"endIndex": 6
|
|
9431
|
+
},
|
|
9432
|
+
"releaseTag": "Public",
|
|
9433
|
+
"overloadIndex": 1,
|
|
9434
|
+
"parameters": [
|
|
9435
|
+
{
|
|
9436
|
+
"parameterName": "value",
|
|
9437
|
+
"parameterTypeTokenRange": {
|
|
9438
|
+
"startIndex": 1,
|
|
9439
|
+
"endIndex": 2
|
|
9440
|
+
},
|
|
9441
|
+
"isOptional": false
|
|
9442
|
+
}
|
|
9443
|
+
],
|
|
9444
|
+
"name": "isRefkeyable"
|
|
9445
|
+
},
|
|
9327
9446
|
{
|
|
9328
9447
|
"kind": "Function",
|
|
9329
9448
|
"canonicalReference": "@alloy-js/core!isRenderableObject:function(1)",
|
|
@@ -9660,6 +9779,76 @@
|
|
|
9660
9779
|
"endIndex": 3
|
|
9661
9780
|
}
|
|
9662
9781
|
},
|
|
9782
|
+
{
|
|
9783
|
+
"kind": "Interface",
|
|
9784
|
+
"canonicalReference": "@alloy-js/core!LibrarySymbolReference:interface",
|
|
9785
|
+
"docComment": "",
|
|
9786
|
+
"excerptTokens": [
|
|
9787
|
+
{
|
|
9788
|
+
"kind": "Content",
|
|
9789
|
+
"text": "export interface LibrarySymbolReference extends "
|
|
9790
|
+
},
|
|
9791
|
+
{
|
|
9792
|
+
"kind": "Reference",
|
|
9793
|
+
"text": "RefkeyableObject",
|
|
9794
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
9795
|
+
},
|
|
9796
|
+
{
|
|
9797
|
+
"kind": "Content",
|
|
9798
|
+
"text": " "
|
|
9799
|
+
}
|
|
9800
|
+
],
|
|
9801
|
+
"fileUrlPath": "src/library-symbol-reference.ts",
|
|
9802
|
+
"releaseTag": "Public",
|
|
9803
|
+
"name": "LibrarySymbolReference",
|
|
9804
|
+
"preserveMemberOrder": false,
|
|
9805
|
+
"members": [
|
|
9806
|
+
{
|
|
9807
|
+
"kind": "MethodSignature",
|
|
9808
|
+
"canonicalReference": "@alloy-js/core!LibrarySymbolReference#[TO_SYMBOL]:member(1)",
|
|
9809
|
+
"docComment": "",
|
|
9810
|
+
"excerptTokens": [
|
|
9811
|
+
{
|
|
9812
|
+
"kind": "Content",
|
|
9813
|
+
"text": "["
|
|
9814
|
+
},
|
|
9815
|
+
{
|
|
9816
|
+
"kind": "Reference",
|
|
9817
|
+
"text": "TO_SYMBOL",
|
|
9818
|
+
"canonicalReference": "@alloy-js/core!TO_SYMBOL:var"
|
|
9819
|
+
},
|
|
9820
|
+
{
|
|
9821
|
+
"kind": "Content",
|
|
9822
|
+
"text": "](): "
|
|
9823
|
+
},
|
|
9824
|
+
{
|
|
9825
|
+
"kind": "Reference",
|
|
9826
|
+
"text": "OutputSymbol",
|
|
9827
|
+
"canonicalReference": "@alloy-js/core!OutputSymbol:class"
|
|
9828
|
+
},
|
|
9829
|
+
{
|
|
9830
|
+
"kind": "Content",
|
|
9831
|
+
"text": ";"
|
|
9832
|
+
}
|
|
9833
|
+
],
|
|
9834
|
+
"isOptional": false,
|
|
9835
|
+
"returnTypeTokenRange": {
|
|
9836
|
+
"startIndex": 3,
|
|
9837
|
+
"endIndex": 4
|
|
9838
|
+
},
|
|
9839
|
+
"releaseTag": "Public",
|
|
9840
|
+
"overloadIndex": 1,
|
|
9841
|
+
"parameters": [],
|
|
9842
|
+
"name": "[TO_SYMBOL]"
|
|
9843
|
+
}
|
|
9844
|
+
],
|
|
9845
|
+
"extendsTokenRanges": [
|
|
9846
|
+
{
|
|
9847
|
+
"startIndex": 1,
|
|
9848
|
+
"endIndex": 2
|
|
9849
|
+
}
|
|
9850
|
+
]
|
|
9851
|
+
},
|
|
9663
9852
|
{
|
|
9664
9853
|
"kind": "TypeAlias",
|
|
9665
9854
|
"canonicalReference": "@alloy-js/core!LineIntrinsicElement:type",
|
|
@@ -11019,8 +11208,8 @@
|
|
|
11019
11208
|
},
|
|
11020
11209
|
{
|
|
11021
11210
|
"kind": "Reference",
|
|
11022
|
-
"text": "
|
|
11023
|
-
"canonicalReference": "@alloy-js/core!
|
|
11211
|
+
"text": "Refkeyable",
|
|
11212
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
11024
11213
|
},
|
|
11025
11214
|
{
|
|
11026
11215
|
"kind": "Content",
|
|
@@ -11032,21 +11221,21 @@
|
|
|
11032
11221
|
},
|
|
11033
11222
|
{
|
|
11034
11223
|
"kind": "Reference",
|
|
11035
|
-
"text": "
|
|
11036
|
-
"canonicalReference": "@alloy-js/core!
|
|
11224
|
+
"text": "Refkeyable",
|
|
11225
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
11037
11226
|
},
|
|
11038
11227
|
{
|
|
11039
11228
|
"kind": "Content",
|
|
11040
|
-
"text": ", ..."
|
|
11229
|
+
"text": " | string, ...("
|
|
11041
11230
|
},
|
|
11042
11231
|
{
|
|
11043
11232
|
"kind": "Reference",
|
|
11044
|
-
"text": "
|
|
11045
|
-
"canonicalReference": "@alloy-js/core!
|
|
11233
|
+
"text": "Refkeyable",
|
|
11234
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
11046
11235
|
},
|
|
11047
11236
|
{
|
|
11048
11237
|
"kind": "Content",
|
|
11049
|
-
"text": "[]]"
|
|
11238
|
+
"text": " | string)[]]"
|
|
11050
11239
|
},
|
|
11051
11240
|
{
|
|
11052
11241
|
"kind": "Content",
|
|
@@ -11100,8 +11289,8 @@
|
|
|
11100
11289
|
},
|
|
11101
11290
|
{
|
|
11102
11291
|
"kind": "Reference",
|
|
11103
|
-
"text": "
|
|
11104
|
-
"canonicalReference": "@alloy-js/core!
|
|
11292
|
+
"text": "RefkeyableObject",
|
|
11293
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
11105
11294
|
},
|
|
11106
11295
|
{
|
|
11107
11296
|
"kind": "Content",
|
|
@@ -11155,6 +11344,10 @@
|
|
|
11155
11344
|
"text": "Refkey",
|
|
11156
11345
|
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
11157
11346
|
},
|
|
11347
|
+
{
|
|
11348
|
+
"kind": "Content",
|
|
11349
|
+
"text": " | string"
|
|
11350
|
+
},
|
|
11158
11351
|
{
|
|
11159
11352
|
"kind": "Content",
|
|
11160
11353
|
"text": ";"
|
|
@@ -11166,7 +11359,7 @@
|
|
|
11166
11359
|
"name": "member",
|
|
11167
11360
|
"propertyTypeTokenRange": {
|
|
11168
11361
|
"startIndex": 1,
|
|
11169
|
-
"endIndex":
|
|
11362
|
+
"endIndex": 3
|
|
11170
11363
|
}
|
|
11171
11364
|
}
|
|
11172
11365
|
],
|
|
@@ -15719,6 +15912,59 @@
|
|
|
15719
15912
|
"isProtected": false,
|
|
15720
15913
|
"isAbstract": false
|
|
15721
15914
|
},
|
|
15915
|
+
{
|
|
15916
|
+
"kind": "Method",
|
|
15917
|
+
"canonicalReference": "@alloy-js/core!OutputSymbol#resolveMemberByName:member(1)",
|
|
15918
|
+
"docComment": "/**\n * Get a member symbol by name from this symbol's member spaces. Checks member\n * spaces in order until it finds a member with that name.\n */\n",
|
|
15919
|
+
"excerptTokens": [
|
|
15920
|
+
{
|
|
15921
|
+
"kind": "Content",
|
|
15922
|
+
"text": "resolveMemberByName(name: "
|
|
15923
|
+
},
|
|
15924
|
+
{
|
|
15925
|
+
"kind": "Content",
|
|
15926
|
+
"text": "string"
|
|
15927
|
+
},
|
|
15928
|
+
{
|
|
15929
|
+
"kind": "Content",
|
|
15930
|
+
"text": "): "
|
|
15931
|
+
},
|
|
15932
|
+
{
|
|
15933
|
+
"kind": "Reference",
|
|
15934
|
+
"text": "OutputSymbol",
|
|
15935
|
+
"canonicalReference": "@alloy-js/core!OutputSymbol:class"
|
|
15936
|
+
},
|
|
15937
|
+
{
|
|
15938
|
+
"kind": "Content",
|
|
15939
|
+
"text": " | undefined"
|
|
15940
|
+
},
|
|
15941
|
+
{
|
|
15942
|
+
"kind": "Content",
|
|
15943
|
+
"text": ";"
|
|
15944
|
+
}
|
|
15945
|
+
],
|
|
15946
|
+
"isStatic": false,
|
|
15947
|
+
"returnTypeTokenRange": {
|
|
15948
|
+
"startIndex": 3,
|
|
15949
|
+
"endIndex": 5
|
|
15950
|
+
},
|
|
15951
|
+
"releaseTag": "Public",
|
|
15952
|
+
"isProtected": false,
|
|
15953
|
+
"overloadIndex": 1,
|
|
15954
|
+
"parameters": [
|
|
15955
|
+
{
|
|
15956
|
+
"parameterName": "name",
|
|
15957
|
+
"parameterTypeTokenRange": {
|
|
15958
|
+
"startIndex": 1,
|
|
15959
|
+
"endIndex": 2
|
|
15960
|
+
},
|
|
15961
|
+
"isOptional": false
|
|
15962
|
+
}
|
|
15963
|
+
],
|
|
15964
|
+
"isOptional": false,
|
|
15965
|
+
"isAbstract": false,
|
|
15966
|
+
"name": "resolveMemberByName"
|
|
15967
|
+
},
|
|
15722
15968
|
{
|
|
15723
15969
|
"kind": "Property",
|
|
15724
15970
|
"canonicalReference": "@alloy-js/core!OutputSymbol#scope:member",
|
|
@@ -16032,6 +16278,33 @@
|
|
|
16032
16278
|
"endIndex": 2
|
|
16033
16279
|
}
|
|
16034
16280
|
},
|
|
16281
|
+
{
|
|
16282
|
+
"kind": "PropertySignature",
|
|
16283
|
+
"canonicalReference": "@alloy-js/core!OutputSymbolOptions#lazyMemberInitializer:member",
|
|
16284
|
+
"docComment": "/**\n * Provide a function which lazy-initializes members when an enumeration of members are needed.\n */\n",
|
|
16285
|
+
"excerptTokens": [
|
|
16286
|
+
{
|
|
16287
|
+
"kind": "Content",
|
|
16288
|
+
"text": "lazyMemberInitializer?: "
|
|
16289
|
+
},
|
|
16290
|
+
{
|
|
16291
|
+
"kind": "Content",
|
|
16292
|
+
"text": "() => void"
|
|
16293
|
+
},
|
|
16294
|
+
{
|
|
16295
|
+
"kind": "Content",
|
|
16296
|
+
"text": ";"
|
|
16297
|
+
}
|
|
16298
|
+
],
|
|
16299
|
+
"isReadonly": false,
|
|
16300
|
+
"isOptional": true,
|
|
16301
|
+
"releaseTag": "Public",
|
|
16302
|
+
"name": "lazyMemberInitializer",
|
|
16303
|
+
"propertyTypeTokenRange": {
|
|
16304
|
+
"startIndex": 1,
|
|
16305
|
+
"endIndex": 2
|
|
16306
|
+
}
|
|
16307
|
+
},
|
|
16035
16308
|
{
|
|
16036
16309
|
"kind": "PropertySignature",
|
|
16037
16310
|
"canonicalReference": "@alloy-js/core!OutputSymbolOptions#metadata:member",
|
|
@@ -17749,43 +18022,34 @@
|
|
|
17749
18022
|
},
|
|
17750
18023
|
{
|
|
17751
18024
|
"kind": "Content",
|
|
17752
|
-
"text": " | (
|
|
18025
|
+
"text": " | import(\"../refkey.js\")."
|
|
17753
18026
|
},
|
|
17754
18027
|
{
|
|
17755
18028
|
"kind": "Reference",
|
|
17756
|
-
"text": "
|
|
17757
|
-
"canonicalReference": "@alloy-js/core!
|
|
18029
|
+
"text": "RefkeyableObject",
|
|
18030
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
17758
18031
|
},
|
|
17759
18032
|
{
|
|
17760
18033
|
"kind": "Content",
|
|
17761
|
-
"text": "
|
|
17762
|
-
},
|
|
17763
|
-
{
|
|
17764
|
-
"kind": "Reference",
|
|
17765
|
-
"text": "Ref",
|
|
17766
|
-
"canonicalReference": "@vue/reactivity!Ref:interface"
|
|
17767
|
-
},
|
|
17768
|
-
{
|
|
17769
|
-
"kind": "Content",
|
|
17770
|
-
"text": "<any, any> | import(\"../refkey.js\")."
|
|
18034
|
+
"text": " | (() => "
|
|
17771
18035
|
},
|
|
17772
18036
|
{
|
|
17773
18037
|
"kind": "Reference",
|
|
17774
|
-
"text": "
|
|
17775
|
-
"canonicalReference": "@alloy-js/core!
|
|
18038
|
+
"text": "Children",
|
|
18039
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
17776
18040
|
},
|
|
17777
18041
|
{
|
|
17778
18042
|
"kind": "Content",
|
|
17779
|
-
"text": " | import(\"
|
|
18043
|
+
"text": ") | import(\"@vue/reactivity\")."
|
|
17780
18044
|
},
|
|
17781
18045
|
{
|
|
17782
18046
|
"kind": "Reference",
|
|
17783
|
-
"text": "
|
|
17784
|
-
"canonicalReference": "@
|
|
18047
|
+
"text": "Ref",
|
|
18048
|
+
"canonicalReference": "@vue/reactivity!Ref:interface"
|
|
17785
18049
|
},
|
|
17786
18050
|
{
|
|
17787
18051
|
"kind": "Content",
|
|
17788
|
-
"text": " | import(\"../reactivity.js\")."
|
|
18052
|
+
"text": "<any, any> | import(\"../reactivity.js\")."
|
|
17789
18053
|
},
|
|
17790
18054
|
{
|
|
17791
18055
|
"kind": "Reference",
|
|
@@ -17993,7 +18257,7 @@
|
|
|
17993
18257
|
"fileUrlPath": "src/components/ReferenceOrContent.tsx",
|
|
17994
18258
|
"returnTypeTokenRange": {
|
|
17995
18259
|
"startIndex": 3,
|
|
17996
|
-
"endIndex":
|
|
18260
|
+
"endIndex": 58
|
|
17997
18261
|
},
|
|
17998
18262
|
"releaseTag": "Public",
|
|
17999
18263
|
"overloadIndex": 1,
|
|
@@ -18176,12 +18440,71 @@
|
|
|
18176
18440
|
},
|
|
18177
18441
|
{
|
|
18178
18442
|
"kind": "TypeAlias",
|
|
18179
|
-
"canonicalReference": "@alloy-js/core!
|
|
18443
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type",
|
|
18444
|
+
"docComment": "",
|
|
18445
|
+
"excerptTokens": [
|
|
18446
|
+
{
|
|
18447
|
+
"kind": "Content",
|
|
18448
|
+
"text": "export type Refkeyable = "
|
|
18449
|
+
},
|
|
18450
|
+
{
|
|
18451
|
+
"kind": "Reference",
|
|
18452
|
+
"text": "RefkeyableObject",
|
|
18453
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
18454
|
+
},
|
|
18455
|
+
{
|
|
18456
|
+
"kind": "Content",
|
|
18457
|
+
"text": " | "
|
|
18458
|
+
},
|
|
18459
|
+
{
|
|
18460
|
+
"kind": "Reference",
|
|
18461
|
+
"text": "Refkey",
|
|
18462
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
18463
|
+
},
|
|
18464
|
+
{
|
|
18465
|
+
"kind": "Content",
|
|
18466
|
+
"text": ";"
|
|
18467
|
+
}
|
|
18468
|
+
],
|
|
18469
|
+
"fileUrlPath": "src/refkey.ts",
|
|
18470
|
+
"releaseTag": "Public",
|
|
18471
|
+
"name": "Refkeyable",
|
|
18472
|
+
"typeTokenRange": {
|
|
18473
|
+
"startIndex": 1,
|
|
18474
|
+
"endIndex": 4
|
|
18475
|
+
}
|
|
18476
|
+
},
|
|
18477
|
+
{
|
|
18478
|
+
"kind": "Variable",
|
|
18479
|
+
"canonicalReference": "@alloy-js/core!REFKEYABLE:var",
|
|
18480
|
+
"docComment": "",
|
|
18481
|
+
"excerptTokens": [
|
|
18482
|
+
{
|
|
18483
|
+
"kind": "Content",
|
|
18484
|
+
"text": "REFKEYABLE: "
|
|
18485
|
+
},
|
|
18486
|
+
{
|
|
18487
|
+
"kind": "Content",
|
|
18488
|
+
"text": "unique symbol"
|
|
18489
|
+
}
|
|
18490
|
+
],
|
|
18491
|
+
"fileUrlPath": "src/refkey.ts",
|
|
18492
|
+
"isReadonly": true,
|
|
18493
|
+
"releaseTag": "Public",
|
|
18494
|
+
"name": "REFKEYABLE",
|
|
18495
|
+
"variableTypeTokenRange": {
|
|
18496
|
+
"startIndex": 1,
|
|
18497
|
+
"endIndex": 2
|
|
18498
|
+
}
|
|
18499
|
+
},
|
|
18500
|
+
{
|
|
18501
|
+
"kind": "TypeAlias",
|
|
18502
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type",
|
|
18180
18503
|
"docComment": "",
|
|
18181
18504
|
"excerptTokens": [
|
|
18182
18505
|
{
|
|
18183
18506
|
"kind": "Content",
|
|
18184
|
-
"text": "export type
|
|
18507
|
+
"text": "export type RefkeyableObject = "
|
|
18185
18508
|
},
|
|
18186
18509
|
{
|
|
18187
18510
|
"kind": "Content",
|
|
@@ -18189,12 +18512,21 @@
|
|
|
18189
18512
|
},
|
|
18190
18513
|
{
|
|
18191
18514
|
"kind": "Reference",
|
|
18192
|
-
"text": "
|
|
18193
|
-
"canonicalReference": "@alloy-js/core
|
|
18515
|
+
"text": "REFKEYABLE",
|
|
18516
|
+
"canonicalReference": "@alloy-js/core!REFKEYABLE:var"
|
|
18194
18517
|
},
|
|
18195
18518
|
{
|
|
18196
18519
|
"kind": "Content",
|
|
18197
|
-
"text": "]:
|
|
18520
|
+
"text": "](): "
|
|
18521
|
+
},
|
|
18522
|
+
{
|
|
18523
|
+
"kind": "Reference",
|
|
18524
|
+
"text": "Refkey",
|
|
18525
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
18526
|
+
},
|
|
18527
|
+
{
|
|
18528
|
+
"kind": "Content",
|
|
18529
|
+
"text": ";\n}"
|
|
18198
18530
|
},
|
|
18199
18531
|
{
|
|
18200
18532
|
"kind": "Content",
|
|
@@ -18203,10 +18535,10 @@
|
|
|
18203
18535
|
],
|
|
18204
18536
|
"fileUrlPath": "src/refkey.ts",
|
|
18205
18537
|
"releaseTag": "Public",
|
|
18206
|
-
"name": "
|
|
18538
|
+
"name": "RefkeyableObject",
|
|
18207
18539
|
"typeTokenRange": {
|
|
18208
18540
|
"startIndex": 1,
|
|
18209
|
-
"endIndex":
|
|
18541
|
+
"endIndex": 6
|
|
18210
18542
|
}
|
|
18211
18543
|
},
|
|
18212
18544
|
{
|
|
@@ -21613,8 +21945,8 @@
|
|
|
21613
21945
|
},
|
|
21614
21946
|
{
|
|
21615
21947
|
"kind": "Reference",
|
|
21616
|
-
"text": "
|
|
21617
|
-
"canonicalReference": "@alloy-js/core!
|
|
21948
|
+
"text": "Refkeyable",
|
|
21949
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
21618
21950
|
},
|
|
21619
21951
|
{
|
|
21620
21952
|
"kind": "Content",
|
|
@@ -21682,8 +22014,8 @@
|
|
|
21682
22014
|
},
|
|
21683
22015
|
{
|
|
21684
22016
|
"kind": "Reference",
|
|
21685
|
-
"text": "
|
|
21686
|
-
"canonicalReference": "@alloy-js/core!
|
|
22017
|
+
"text": "RefkeyableObject",
|
|
22018
|
+
"canonicalReference": "@alloy-js/core!RefkeyableObject:type"
|
|
21687
22019
|
},
|
|
21688
22020
|
{
|
|
21689
22021
|
"kind": "Content",
|
|
@@ -23359,6 +23691,76 @@
|
|
|
23359
23691
|
],
|
|
23360
23692
|
"name": "text"
|
|
23361
23693
|
},
|
|
23694
|
+
{
|
|
23695
|
+
"kind": "Variable",
|
|
23696
|
+
"canonicalReference": "@alloy-js/core!TO_SYMBOL:var",
|
|
23697
|
+
"docComment": "",
|
|
23698
|
+
"excerptTokens": [
|
|
23699
|
+
{
|
|
23700
|
+
"kind": "Content",
|
|
23701
|
+
"text": "TO_SYMBOL: "
|
|
23702
|
+
},
|
|
23703
|
+
{
|
|
23704
|
+
"kind": "Content",
|
|
23705
|
+
"text": "unique symbol"
|
|
23706
|
+
}
|
|
23707
|
+
],
|
|
23708
|
+
"fileUrlPath": "src/library-symbol-reference.ts",
|
|
23709
|
+
"isReadonly": true,
|
|
23710
|
+
"releaseTag": "Public",
|
|
23711
|
+
"name": "TO_SYMBOL",
|
|
23712
|
+
"variableTypeTokenRange": {
|
|
23713
|
+
"startIndex": 1,
|
|
23714
|
+
"endIndex": 2
|
|
23715
|
+
}
|
|
23716
|
+
},
|
|
23717
|
+
{
|
|
23718
|
+
"kind": "Function",
|
|
23719
|
+
"canonicalReference": "@alloy-js/core!toRefkey:function(1)",
|
|
23720
|
+
"docComment": "",
|
|
23721
|
+
"excerptTokens": [
|
|
23722
|
+
{
|
|
23723
|
+
"kind": "Content",
|
|
23724
|
+
"text": "export declare function toRefkey(refkey: "
|
|
23725
|
+
},
|
|
23726
|
+
{
|
|
23727
|
+
"kind": "Reference",
|
|
23728
|
+
"text": "Refkeyable",
|
|
23729
|
+
"canonicalReference": "@alloy-js/core!Refkeyable:type"
|
|
23730
|
+
},
|
|
23731
|
+
{
|
|
23732
|
+
"kind": "Content",
|
|
23733
|
+
"text": "): "
|
|
23734
|
+
},
|
|
23735
|
+
{
|
|
23736
|
+
"kind": "Reference",
|
|
23737
|
+
"text": "Refkey",
|
|
23738
|
+
"canonicalReference": "@alloy-js/core!Refkey:type"
|
|
23739
|
+
},
|
|
23740
|
+
{
|
|
23741
|
+
"kind": "Content",
|
|
23742
|
+
"text": ";"
|
|
23743
|
+
}
|
|
23744
|
+
],
|
|
23745
|
+
"fileUrlPath": "src/refkey.ts",
|
|
23746
|
+
"returnTypeTokenRange": {
|
|
23747
|
+
"startIndex": 3,
|
|
23748
|
+
"endIndex": 4
|
|
23749
|
+
},
|
|
23750
|
+
"releaseTag": "Public",
|
|
23751
|
+
"overloadIndex": 1,
|
|
23752
|
+
"parameters": [
|
|
23753
|
+
{
|
|
23754
|
+
"parameterName": "refkey",
|
|
23755
|
+
"parameterTypeTokenRange": {
|
|
23756
|
+
"startIndex": 1,
|
|
23757
|
+
"endIndex": 2
|
|
23758
|
+
},
|
|
23759
|
+
"isOptional": false
|
|
23760
|
+
}
|
|
23761
|
+
],
|
|
23762
|
+
"name": "toRefkey"
|
|
23763
|
+
},
|
|
23362
23764
|
{
|
|
23363
23765
|
"kind": "Function",
|
|
23364
23766
|
"canonicalReference": "@alloy-js/core!traverseOutput:function(1)",
|
package/test/refkey.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, it } from "vitest";
|
|
2
|
-
import { refkey } from "../src/refkey.js";
|
|
2
|
+
import { refkey, REFKEYABLE, Refkeyable } from "../src/refkey.js";
|
|
3
3
|
|
|
4
4
|
it("is stable when called with same values", () => {
|
|
5
5
|
const obj = {};
|
|
@@ -30,3 +30,14 @@ it("can be called with no args and returns a fresh key", () => {
|
|
|
30
30
|
const key2 = refkey();
|
|
31
31
|
expect(key1).not.toBe(key2);
|
|
32
32
|
});
|
|
33
|
+
|
|
34
|
+
it("unwraps refkeyables", () => {
|
|
35
|
+
const obj = {};
|
|
36
|
+
const rk1 = refkey(obj);
|
|
37
|
+
const refkeyable: Refkeyable = {
|
|
38
|
+
[REFKEYABLE]() {
|
|
39
|
+
return rk1;
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
expect(refkey(refkeyable)).toBe(rk1);
|
|
43
|
+
});
|