Skip to content
Open
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
6 changes: 3 additions & 3 deletions packages/lit-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"fast-glob": "^2.2.6",
"parse5": "5.1.0",
"ts-simple-type": "~1.0.5",
"vscode-css-languageservice": "4.3.0",
"vscode-html-languageservice": "3.1.0",
"vscode-web-custom-data": "^0.3.0",
"vscode-css-languageservice": "4.4.0",
"vscode-html-languageservice": "3.2.0",
"vscode-web-custom-data": "^0.3.6",
"web-component-analyzer": "~1.1.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,16 @@ tsTest("Attribute binding: Boolean type expression (false) is assignable to 'tru
hasNoDiagnostics(t, diagnostics);
});

tsTest("Attribute binding: Non boolean expression (dialog) is assignable to aria-haspopup", t => {
const { diagnostics } = getDiagnostics('html`<input aria-haspopup="dialog" />`');
hasNoDiagnostics(t, diagnostics);
});

tsTest("Attribute binding: Random string literal is not assignable to aria-haspopup", t => {
const { diagnostics } = getDiagnostics('html`<input aria-haspopup="test" />`');
hasDiagnostic(t, diagnostics, "no-incompatible-type-binding");
});

tsTest("Attribute binding: Union of 'string | Directive' type expression is assignable to string", t => {
const { diagnostics } = getDiagnostics('type DirectiveFn = {}; html`<input placeholder="${{} as string | DirectiveFn}" />`');
hasNoDiagnostics(t, diagnostics);
Expand Down