All Projects → avajs → Typescript

avajs / Typescript

Rudimentary TypeScript support

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Typescript

Front End Monorepo
A rebuild of the front-end for zooniverse.org
Stars: ✭ 42 (-6.67%)
Mutual labels:  hacktoberfest
Algorithms
Solved algorithms and data structures problems in many languages
Stars: ✭ 1,021 (+2168.89%)
Mutual labels:  hacktoberfest
Ejs Playground
A web app to play with EJS templates.
Stars: ✭ 44 (-2.22%)
Mutual labels:  hacktoberfest
Publiclab.editor
A general purpose, JS/Bootstrap UI framework for rich text posting. An author-friendly, minimal, mobile/desktop interface for creating blog-like content, designed for PublicLab.org
Stars: ✭ 43 (-4.44%)
Mutual labels:  hacktoberfest
Excellentexport
Javascript export to Excel
Stars: ✭ 1,018 (+2162.22%)
Mutual labels:  hacktoberfest
Snaake Flutter
Snaake is a small and very simple clone of the classic snake game from Nokia phones.
Stars: ✭ 44 (-2.22%)
Mutual labels:  hacktoberfest
Newocr
A custom OCR library in pure Java made as a replacement for MS Paint IDE's OCR
Stars: ✭ 43 (-4.44%)
Mutual labels:  hacktoberfest
Kayenta
Automated Canary Service
Stars: ✭ 1,026 (+2180%)
Mutual labels:  hacktoberfest
Meteor Collection2
A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
Stars: ✭ 1,020 (+2166.67%)
Mutual labels:  hacktoberfest
Pokr
Make agile estimating and planning easy with our online planning or scrum poker tool
Stars: ✭ 44 (-2.22%)
Mutual labels:  hacktoberfest
Traducao
PHP Manual Brazilian Portuguese - Git/GitHub bridge
Stars: ✭ 43 (-4.44%)
Mutual labels:  hacktoberfest
Pytest Mock
Thin-wrapper around the mock package for easier use with pytest
Stars: ✭ 1,020 (+2166.67%)
Mutual labels:  hacktoberfest
John Cena
You can't see me. 😄
Stars: ✭ 44 (-2.22%)
Mutual labels:  hacktoberfest
Phug
Phug - The Pug Template Engine for PHP
Stars: ✭ 43 (-4.44%)
Mutual labels:  hacktoberfest
Boxstarter
Repeatable, reboot resilient windows environment installations made easy using Chocolatey packages
Stars: ✭ 1,024 (+2175.56%)
Mutual labels:  hacktoberfest
Active Record
Active Record database abstraction layer
Stars: ✭ 43 (-4.44%)
Mutual labels:  hacktoberfest
Vyper.fun
Cryptozombies for Vyper: Learn Vyper by building games!
Stars: ✭ 42 (-6.67%)
Mutual labels:  hacktoberfest
Uno.ch9
Ch9 - Uno Reference Implementation project
Stars: ✭ 45 (+0%)
Mutual labels:  hacktoberfest
Nixery
Container registry which transparently builds images using the Nix package manager
Stars: ✭ 1,023 (+2173.33%)
Mutual labels:  hacktoberfest
Zeppelin Mongodb Interpreter
MongoDB interpreter for Apache Zeppelin
Stars: ✭ 44 (-2.22%)
Mutual labels:  hacktoberfest

@ava/typescript

Adds rudimentary TypeScript support to AVA.

This is designed to work for projects that precompile their TypeScript code, including tests. It allows AVA to load the resulting JavaScript, while configuring AVA to use the TypeScript paths.

In other words, say you have a test file at src/test.ts. You've configured TypeScript to output to build/. Using @ava/typescript you can run the build/test.js file using npx ava src/test.ts. AVA won't pick up any of the JavaScript files present in the build/ directory, unless they have a TypeScript counterpart in src/.

Enabling TypeScript support

Add this package to your project:

npm install --save-dev @ava/typescript

Then, enable TypeScript support either in package.json or ava.config.*:

package.json:

{
	"ava": {
		"typescript": {
			"rewritePaths": {
				"src/": "build/"
			}
		}
	}
}

Both keys and values of the rewritePaths object must end with a /. Paths are relative to your project directory.

Output files are expected to have the .js extension.

AVA searches your entire project for *.js, *.cjs, *.mjs and *.ts files (or other extensions you've configured). It will ignore such files found in the rewritePaths targets (e.g. build/). If you use more specific paths, for instance build/main/, you may need to change AVA's files configuration to ignore other directories.

Add additional extensions

You can configure AVA to recognize additional file extensions. To add (partial†) JSX support:

package.json:

{
	"ava": {
		"typescript": {
			"extensions": [
				"ts",
				"tsx"
			],
			"rewritePaths": {
				"src/": "build/"
			}
		}
	}
}

See also AVA's extensions option.

† Note that the preserve mode for JSX is not (yet) supported.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].