-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
type inference implemented. Now intersection types in your TypeScript code will be transformed into type guard signatures. This functionality can help you infer type guard signatures for complex types, making your TypeScript code more expressive and maintainable. ```typescript const inputCode = ` type IntersectionType = TypeA & TypeB; type TypeA = { a: string }; type TypeB = { b: number }; `; const transformedCode = transformer(inputCode); console.log(transformedCode); // type IntersectionType = {}; // type TypeA = { a: string }; // type TypeB = { b: number }; ```
- Loading branch information
Showing
21 changed files
with
1,031 additions
and
2,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
dist/ | ||
node_modules/ | ||
.idea/ | ||
.run/ | ||
coverage/ | ||
lib/ | ||
lib-esm/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Arrays)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/arrayType.spec.ts" /> | ||
<test-names> | ||
<test-name value="Generator" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Enums)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/enumType.spec.ts" /> | ||
<test-names> | ||
<test-name value="Generator" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Generics)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/generics.spec.ts" /> | ||
<test-names> | ||
<test-name value="Generator" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Interfaces)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/interfaceType.spec.ts" /> | ||
<test-names> | ||
<test-name value="Generator" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Literal Types)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/literalType.spec.ts" /> | ||
<test-names> | ||
<test-name value="Generator" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests (Utils)" type="JavaScriptTestRunnerJest"> | ||
<node-interpreter value="project" /> | ||
<node-options value="--experimental-vm-modules" /> | ||
<jest-package value="$PROJECT_DIR$/node_modules/jest" /> | ||
<working-dir value="$PROJECT_DIR$" /> | ||
<envs /> | ||
<scope-kind value="SUITE" /> | ||
<test-file value="$PROJECT_DIR$/src/__tests__/generate.spec.ts" /> | ||
<test-names> | ||
<test-name value="Utils" /> | ||
</test-names> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="start-dev" type="js.build_tools.npm" nameIsGenerated="true"> | ||
<package-json value="$PROJECT_DIR$/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="start-dev" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="test" type="js.build_tools.npm"> | ||
<package-json value="$PROJECT_DIR$/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="test" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="watch-mode" type="js.build_tools.npm" nameIsGenerated="true"> | ||
<package-json value="$PROJECT_DIR$/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="watch-mode" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.