Provide TypeScript config for minimum common API

Open
#31 5 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

Start with the TypeScript lib configuration documentation, the @tsconfig/bases project, and the WinterCG API lists linked in the issue. Done means a reusable @tsconfig/wintercg configuration and a TypeScript lib option that provide the stated common APIs for type checking and editor support.

Written by the indexing model from the issue text.

Description

My company is looking for integrating WinterCG common minimum API into TypeScript config, in order to provide type checking, error highlighting, autocomplete, etc.

1. TypeScript base config

Developers may be able to write something like this in tsconfig.json:

{
  "extends": "@tsconfig/wintercg/tsconfig.json"
}

This tsconfig should at least support the common minimum APIs which are listed in https://blog.cloudflare.com/introducing-the-wintercg/ and https://common-min-api.proposal.wintercg.org/.

Install the wintercg tsconfig:

npm install --save-dev @tsconfig/wintercg
yarn add --dev @tsconfig/wintercg

2. lib

Provide WinterCG common minimum API access in the lib configuration. For example: lib can be set to WinterCG.

Screenshot from 2022-11-04 16-59-36

Dominant language
Bikeshed
Stars
308
Forks
17
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WinterTC55/proposal-minimum-common-api

All issues in WinterTC55/proposal-minimum-common-api

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.