Move the experiment into src/plugins and src/experiment

This commit is contained in:
Jos de Jong 2023-03-13 16:31:41 +01:00
parent b9cfe706fc
commit aa044a54e7
4 changed files with 4 additions and 4 deletions

View File

@ -5,8 +5,8 @@
main: 'index.ts', main: 'index.ts',
scripts: { scripts: {
'build-and-run': 'ttsc -b && node build', 'build-and-run': 'ttsc -b && node build',
'experiment-infer': 'tsc plugins/infer.ts && node plugins/infer.js ./src/generic/arithmetic.ts', 'experiment-infer': 'ttsc -b && node build/plugins/infer.js ./src/generic/arithmetic.ts',
'experiment-infer-direct': 'tsc plugins/infer.ts && node plugins/infer.js ./src/generic/arithmeticDirect.ts', 'experiment-infer-direct': 'ttsc -b && node build/plugins/infer.js ./src/experiment/arithmeticInfer.ts',
test: 'echo "Error: no test specified" && exit 1', test: 'echo "Error: no test specified" && exit 1',
}, },
keywords: [ keywords: [

1
plugins/.gitignore vendored
View File

@ -1 +0,0 @@
*.js

View File

@ -1,4 +1,4 @@
import {infer} from './infer' import {infer} from '../generic/infer'
export const square = infer(<T>(dep: { export const square = infer(<T>(dep: {
multiply: (a: number, b: number) => number, multiply: (a: number, b: number) => number,

View File

@ -24,6 +24,7 @@ import { inspect } from 'util'
* *
* - https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin * - https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin
* - https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API * - https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
* - https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#using-the-type-checker
* - https://github.com/Microsoft/TypeScript/wiki/Using-the-Language-Service-API * - https://github.com/Microsoft/TypeScript/wiki/Using-the-Language-Service-API
*/ */