You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing an Input transform that converts a string to Date, but the angular vscode extension is not accepting type of 'string | Date' for the input value.
The error I get is: Unable to import type Date. The symbol is not exported from /Users/<username>/.vscode/extensions/angular.ng-template-17.0.2/node_modules/typescript/lib/lib.es5.d.ts.(-993004) lib.es5.d.ts(22, 3): The type is declared here.
Bug Type
What does this bug affect
Angular Language Service VSCode extension
Angular Language Service server
Reproduction
function dateAttribute(value: string | Date): Date {
return typeof value === 'string' ? new Date(value) : value;
}
@Component({
selector: 'foo-bar',
standalone: true,
imports: [CommonModule],
templateUrl: './foo-bar.component.html',
styleUrls: ['./foo-bar.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
@Input({
transform: dateAttribute,
})
pausedAt: Date;
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
🌍 Your Environment
Angular Version:
16.1.1
Extension Version:
17.0.2
VSCode Version:
1.84.2
Operating System:
Mac Sonoma 14.1.1
The text was updated successfully, but these errors were encountered:
🐞 bug report
Is this a regression?
No
Description
I'm implementing an Input transform that converts a string to Date, but the angular vscode extension is not accepting type of 'string | Date' for the input value.
The error I get is:
Unable to import type Date. The symbol is not exported from /Users/<username>/.vscode/extensions/angular.ng-template-17.0.2/node_modules/typescript/lib/lib.es5.d.ts.(-993004) lib.es5.d.ts(22, 3): The type is declared here.
Bug Type
What does this bug affect
Reproduction
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
🌍 Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System:
The text was updated successfully, but these errors were encountered: