Giter Site home page Giter Site logo

types-with-jsdocs's Introduction

Using Typescript Types with JSDoc

Experimentation repo for various ways to type react apps.

See ./src folder for examples

Globally enable TS checking

To enable TS to run everywhere use the js/ts.implicitProjectConfig.checkJS setting in your VScode workspace or user settings.

"js/ts.implicitProjectConfig.checkJs": true

Typescript ignore errors

Pro-tip: CLI tool to automatically add ignore comments

The //@ts-ignore tells TypeScript to ignore the TypeScript errors in the line following the comment.

function mapValues(object, mapFunction) {
  // @ts-ignore
  return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, mapFunction(value)]))
}

This //@ts-expect-error will ignore any typechecking failures in the next line, but will fail the typecheck if there are no errors

function mapValues(object, mapFunction) {
  //@ts-expect-error
  return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, mapFunction(value)]))
}

Ignoring multiple lines

// @ts-ignore-start
// @ts-ignore-end

Nuclear option to disable in file

// @ts-nocheck

Examples

Resources & Articles

Tools

Doc parsers

Formatters

Conversion tools

Extra imported types

Doc Generators

Runtime type checkers

VScode extensions

Msc

Examples

Using test code for docs

types-with-jsdocs's People

Contributors

dalmaer avatar davidwells avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dok6n dalmaer coleea

types-with-jsdocs's Issues

Sorting by dead/active repos

Hi. I would like to request to sort he links out by activity,starring, and dead status of the repo links. Thanks!

项目引用了json-schema等860个开源组件,存在2个漏洞,建议升级

大佬,我IDE运行您这个项目的时候,提醒我有几个漏洞,项目调用了json-schema等860个开源组件,存在2个安全漏洞,建议你升级下。

漏洞标题:json-schema  安全漏洞
漏洞编号:CVE-2021-3918
漏洞描述:
json-schema是这是 JSON Schema 规范和实现的早期开发的历史存储库。
json-schema 存在安全漏洞,该漏洞源于json-schema容易受到对象原型属性控制不当的影响(“原型污染”)。
影响范围:(∞, 0.4.0)
最小修复版本:0.4.0
引入路径:
[email protected]>[email protected]>[email protected]>[email protected]>[email protected]

另外1个漏洞 ,信息有点多我就不贴了,你自己看下完整报告:https://www.mfsec.cn/jr?p=a8a78f

你对这个issues有任何疑问可以回复我哈,系统会提醒我的,谢谢了。

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.