File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,20 @@ public enum JSValue: Equatable {
82
82
83
83
extension JSValue {
84
84
/// An unsafe convenience method of `JSObject.subscript(_ name: String) -> ((ConvertibleToJSValue...) -> JSValue)?`
85
+ /// - Precondition: `self` must be a JavaScript Object and specified member should be a callable object.
85
86
public subscript( dynamicMember name: String ) -> ( ( ConvertibleToJSValue . . . ) -> JSValue ) {
86
87
object![ dynamicMember: name] !
87
88
}
88
89
89
90
/// An unsafe convenience method of `JSObject.subscript(_ index: Int) -> JSValue`
91
+ /// - Precondition: `self` must be a JavaScript Object.
90
92
public subscript( dynamicMember name: String ) -> JSValue {
91
93
get { self . object![ name] }
92
94
set { self . object![ name] = newValue }
93
95
}
94
96
95
97
/// An unsafe convenience method of `JSObject.subscript(_ index: Int) -> JSValue`
98
+ /// - Precondition: `self` must be a JavaScript Object.
96
99
public subscript( _ index: Int ) -> JSValue {
97
100
get { object![ index] }
98
101
set { object![ index] = newValue }
You can’t perform that action at this time.
0 commit comments