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>({
9797 expectNotType < any > ( thisShouldBeNumber )
9898 expectType < number > ( thisShouldBeNumber )
9999}
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.
2424/// <reference path="./lib.wx.page.d.ts" />
2525/// <reference path="./lib.wx.api.d.ts" />
2626/// <reference path="./lib.wx.cloud.d.ts" />
27+ /// <reference path="./lib.wx.canvas.d.ts" />
2728/// <reference path="./lib.wx.component.d.ts" />
2829/// <reference path="./lib.wx.behavior.d.ts" />
2930/// <reference path="./lib.wx.event.d.ts" />
You can’t perform that action at this time.
0 commit comments