Comments (6)
I think the dom
declarations should be included in the we-app project while developing
You should figure out which dom interfaces are supported by we-app or not by yourself
from typed-we-app.
@emeryao so far, I can't find any dom
interface that can be use in wechat mini program
from typed-we-app.
what about the console
you said in the issue description
from typed-we-app.
So I think the console
in dom.d.ts
is a browser console , maybe wechat miniprogram use the same console object , but It 's more like a MiniProgramConsole
.
Have the dom in the type definition may make us easily use any present api that browse already have , but it also give us an unreliable type definition (a method or class may pass by type check , but it may be just a undefined
)
that's also why typescript separate the whole type definition into several file, and allowd use choose different lib
please reconsider this for someone who use the "strict type definition "
from typed-we-app.
I think your so called MiniProgramConsole
is the same with window.console
in dom
from typed-we-app.
but things like WebSocket
and Worker
are different than browser dom
api, and there are many api that wechat do not support.
if the type definition is incorrect , what's the different with js + "AutoComplete" +"Bable"
we are using typescript , shouldn't us make the type definition correct ?
from typed-we-app.
Related Issues (14)
- 请问可否发布到npm HOT 4
- suggestion to merge to official site HOT 3
- UserInfo接口有误 HOT 1
- Example HOT 6
- Update to 2.1.0 HOT 3
- How to return never when code uploadFile task onProgressUpdate callback function HOT 4
- 好像里面没有 Component 的声明? HOT 3
- 已关注,刚学ts,有实际使用的demo吗 HOT 2
- udpate to 2.3.0 HOT 7
- Report an error when declaring a variable with this.data HOT 4
- A rest parameter must be of an array type. HOT 9
- A runtime for Coding wechat MiniProgram in strong type. HOT 4
- interface UpdateManager 方法返回值未定义 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typed-we-app.