Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Plugin: basic diagnostics and functionality for .gts files #753

Merged
merged 7 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
"lifeart.vscode-glimmer-syntax",
"--disable-extension",
"unifiedjs.vscode-mdx",
"--disable-extension",
"Vue.volar",
"${workspaceFolder}/test-packages/ts-plugin-test-app"
]
},
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ Glint transforms template code into TypeScript code so that it can be type-check
```ts
static {
({} as typeof import("@glint/environment-ember-loose/-private/dsl")
.templateForBackingValue(this, function(𝚪, χ: typeof import("@glint/environment-ember-loose/-private/dsl")) {
.templateForBackingValue(this, function(__glintRef__, __glintDSL__: typeof import("@glint/environment-ember-loose/-private/dsl")) {
{
const 𝛄 = χ.emitComponent(χ.resolve(χ.Globals["FooComponent"])
({ desc: "notchHeight _ footer", ...χ.NamedArgsMarker }));
𝛄;
const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["FooComponent"])
({ desc: "notchHeight _ footer", ...__glintDSL__.NamedArgsMarker }));
__glintY__;
{
const [] = 𝛄.blockParams["default"];
const [] = __glintY__.blockParams["default"];
{
// ...
```
Expand Down
2 changes: 1 addition & 1 deletion packages/core/__tests__/transform/offset-mapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe.skip('Transform: Source-to-source offset mapping', () => {
}

function findOccurrence(haystack: string, needle: string, occurrence: number): number {
let offset = haystack.indexOf('function(𝚪');
let offset = haystack.indexOf('function(__glintRef__');
for (let i = 0; i < occurrence + 1; i++) {
offset = haystack.indexOf(needle, offset + 1);

Expand Down
188 changes: 94 additions & 94 deletions packages/core/__tests__/transform/rewrite.test.ts

Large diffs are not rendered by default.

Loading
Loading