GithubHelp home page GithubHelp logo

Comments (6)

emeryao avatar emeryao commented on August 26, 2024

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.

John0King avatar John0King commented on August 26, 2024

@emeryao so far, I can't find any dom interface that can be use in wechat mini program

from typed-we-app.

emeryao avatar emeryao commented on August 26, 2024

what about the console you said in the issue description

from typed-we-app.

John0King avatar John0King commented on August 26, 2024

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.

emeryao avatar emeryao commented on August 26, 2024

I think your so called MiniProgramConsole is the same with window.console in dom

from typed-we-app.

John0King avatar John0King commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.