Skip to content

Commit

Permalink
Removed all unneccessary undefined assignments for property declarati…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
harmen-xb committed Nov 9, 2023
1 parent eeb72d5 commit 47ce208
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function matchIndentBase(text: string, offset: number, matchedTokens: IToken[],

// indentation can only be matched at the start of a line.
if (isFirstLine || isStartOfLine) {
let currIndentLevel: number | undefined = undefined;
let currIndentLevel: number | undefined;
const prevIndentLevel = indentStack.getLast();

const wsRegExp = /[ ]+/y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export class CrossModelTokenBuilder extends DefaultTokenBuilder {
const tokens: TokenType[] = super.buildTokens(grammar, options) as TokenType[];

const updatedTokens: TokenType[] = [];
let tokenWithSpaces: TokenType | undefined = undefined;
let tokenIndent: TokenType | undefined = undefined;
let tokenDedent: TokenType | undefined = undefined;
let tokenNewLine: TokenType | undefined = undefined;
let tokenWithSpaces: TokenType | undefined;
let tokenIndent: TokenType | undefined;
let tokenDedent: TokenType | undefined;
let tokenNewLine: TokenType | undefined;

for (const token of tokens) {
if (token.name === NAMES.SPACES) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ModelServer implements Disposable {
*/
async requestModelDiagramNode(uri: string, id: string): Promise<DiagramNodeEntity | undefined> {
const root = (await this.modelService.request(uri)) as CrossModelRootAst;
let diagramNode: DiagramNode | undefined = undefined;
let diagramNode: DiagramNode | undefined;

if (!root || !root.diagram) {
throw new Error('Something went wrong loading the diagram');
Expand Down
4 changes: 2 additions & 2 deletions packages/form-client/src/browser/form-editor-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class FormEditorWidget extends ReactWidget implements NavigatableWidget,
@inject(CommandService) protected commandService: CommandService;
@inject(ModelServiceClient) protected formClient: ModelServiceClient;

protected syncedModel: CrossModelRoot | undefined = undefined;
protected error: string | undefined = undefined;
protected syncedModel: CrossModelRoot | undefined;
protected error: string | undefined;

@postConstruct()
init(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ModelPropertyWidget extends ReactWidget implements PropertyViewCont
@inject(ModelService) protected modelService: ModelService;
@inject(ApplicationShell) protected shell: ApplicationShell;

protected model: CrossModelRoot | undefined = undefined;
protected model: CrossModelRoot | undefined;
protected uri: string;

constructor() {
Expand Down

0 comments on commit 47ce208

Please sign in to comment.