File tree Expand file tree Collapse file tree 4 files changed +3157
-126
lines changed Expand file tree Collapse file tree 4 files changed +3157
-126
lines changed Original file line number Diff line number Diff line change @@ -97,3 +97,15 @@ wx.request<ArrayBuffer>({
97
97
expectNotType < any > ( thisShouldBeNumber )
98
98
expectType < number > ( thisShouldBeNumber )
99
99
}
100
+
101
+ wx . createSelectorQuery ( )
102
+ . select ( '#canvas' )
103
+ . node ( ( { node } ) => {
104
+ const canvas = node as WechatMiniprogram . Canvas
105
+ const ctx = canvas . getContext ( '2d' )
106
+
107
+ expectNotType < any > ( ctx )
108
+ expectType < string > ( ctx . font )
109
+ expectType < ( ) => void > ( ctx . save )
110
+ } )
111
+ . exec ( )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ SOFTWARE.
24
24
/// <reference path="./lib.wx.page.d.ts" />
25
25
/// <reference path="./lib.wx.api.d.ts" />
26
26
/// <reference path="./lib.wx.cloud.d.ts" />
27
+ /// <reference path="./lib.wx.canvas.d.ts" />
27
28
/// <reference path="./lib.wx.component.d.ts" />
28
29
/// <reference path="./lib.wx.behavior.d.ts" />
29
30
/// <reference path="./lib.wx.event.d.ts" />
You can’t perform that action at this time.
0 commit comments