GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Arlen22/TypeScript: TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

36,365 Commits
36,365 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.github
.github
 
 
.vscode
.vscode
 
 
bin
bin
 
 
example
example
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.c8rc.json
.c8rc.json
 
 
.dprint.jsonc
.dprint.jsonc
 
 
.editorconfig
.editorconfig
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gulp.js
.gulp.js
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Herebyfile.mjs
Herebyfile.mjs
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SUPPORT.md
SUPPORT.md
 
 
ThirdPartyNoticeText.txt
ThirdPartyNoticeText.txt
 
 
azure-pipelines.release.yml
azure-pipelines.release.yml
 
 
eslint.config.mjs
eslint.config.mjs
 
 
knip.jsonc
knip.jsonc
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

Fork of Typescript

This fork contains a few modifications to Typescript to preview the try-expression-proposal syntax. It is not intended to be used in production.

To play around with it for yourself

  • Create a new npm project folder using npm init.
  • npm install the built tgz file from the releases page of this repository.
    • https://github.com/Arlen22/TypeScript/releases/download/arlen22-dev-0.3/typescript-5.8.0-arlen22-0.3.tgz
  • In VSCode, create a new typescript file and open it to enable the Typescript engine, then run the command "Typescript: Select Typescript Version" and select the version from your node_modules folder.
  • Create a tsconfig.json file with strictNullChecks enabled.
  • If you run tsc it will just pass the syntax through to the Javascript file.

The following code should be valid

const [error, data]: TryResult<1> = try 1;
if (error) {
  const e: TryError = error;
  const r: undefined = data;
} else {
  const e: undefined = error;
  const r: 1 = data;
}
// try at the beginning of an arrow function body
const [error1, data1] = (() => try someExpression() ?? otherexpression() ? true : false)();
// regular assignment, terminated by comma, semicolon, or other statement.
const [error2, data2] = try someExpression() ?? otherexpression() ? true : false;
// used as an array value, terminated by comma or end of array
const [[error3, data3]] = [try someExpression() ?? otherexpression() ? true : false];
// used as an object value, terminated by comma or end of object
const { res: [error4, data4] } = { res: try someExpression() ?? otherexpression() ? true : false }

Changelog

0.2

  • Added the try-expression-proposal syntax to the parser basically copying the yield syntax.

0.1

  • Failed attempt that only partly worked.

TypeScript

GitHub Actions CI npm version Downloads OpenSSF Scorecard

TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the playground, and stay up to date via our blog and Twitter account.

Find others who are using TypeScript at our community page.

Installing

For the latest stable version:

npm install -D typescript

For our nightly builds:

npm install -D typescript@next

Contribute

There are many ways to contribute to TypeScript.

  • Submit bugs and help us verify fixes as they are checked in.
  • Review the source code changes.
  • Engage with other TypeScript users and developers on StackOverflow.
  • Help each other in the TypeScript Community Discord.
  • Join the #typescript discussion on Twitter.
  • Contribute bug fixes.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Documentation

  • TypeScript in 5 minutes
  • Programming handbook
  • Homepage

Roadmap

For details on our planned features and future direction, please refer to our roadmap.

About

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

www.typescriptlang.org

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.