Fixed a printer crash caused by empty parameter modifiers
This commit is contained in:
Родитель
b3c67d3202
Коммит
d1d4f39130
|
@ -1114,7 +1114,7 @@ export function createSyntacticTypeNodeBuilder(
|
|||
function ensureParameter(p: ParameterDeclaration, context: SyntacticTypeNodeBuilderContext) {
|
||||
return factory.updateParameterDeclaration(
|
||||
p,
|
||||
[],
|
||||
p.modifiers,
|
||||
reuseNode(context, p.dotDotDotToken),
|
||||
resolver.serializeNameOfParameter(context, p),
|
||||
resolver.isOptionalParameter(p) ? factory.createToken(SyntaxKind.QuestionToken) : undefined,
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
///<reference path="fourslash.ts" />
|
||||
|
||||
// @filename: /tokenizer.ts
|
||||
//// export default abstract class Tokenizer {
|
||||
//// errorBuilder() {
|
||||
//// return (pos: number, lineStart: number, curLine: number) => {};
|
||||
//// }
|
||||
//// }
|
||||
|
||||
// @filename: /expression.ts
|
||||
//// import Tokenizer from "./tokenizer.js";
|
||||
////
|
||||
//// export default abstract class ExpressionParser extends Tokenizer {
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
verify.completions({
|
||||
marker: "",
|
||||
includes: [
|
||||
{
|
||||
name: "errorBuilder",
|
||||
insertText: "errorBuilder(): (pos: number, lineStart: number, curLine: number) => void {\n}",
|
||||
filterText: "errorBuilder",
|
||||
},
|
||||
],
|
||||
preferences: {
|
||||
includeCompletionsWithInsertText: true,
|
||||
includeCompletionsWithClassMemberSnippets: true,
|
||||
},
|
||||
isNewIdentifierLocation: true,
|
||||
});
|
Загрузка…
Ссылка в новой задаче