Skip to content

Commit

Permalink
Improve typing of PipelineWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-schwarz committed Jan 15, 2024
1 parent a224ee9 commit 815a580
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libs/language-server/src/lib/ast/wrappers/pipeline-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ import {
import { AstNodeWrapper } from './ast-node-wrapper';
import { PipeWrapper, createWrappersFromPipeChain } from './pipe-wrapper';

export class PipelineWrapper
implements AstNodeWrapper<PipelineDefinition | CompositeBlocktypeDefinition>
export class PipelineWrapper<
T extends PipelineDefinition | CompositeBlocktypeDefinition,
> implements AstNodeWrapper<T>
{
public readonly astNode: PipelineDefinition | CompositeBlocktypeDefinition;
public readonly astNode: T;

allPipes: PipeWrapper[] = [];

constructor(
pipesContainer: PipelineDefinition | CompositeBlocktypeDefinition,
) {
constructor(pipesContainer: T) {
this.astNode = pipesContainer;

this.allPipes = pipesContainer.pipes.flatMap((pipe) =>
Expand Down

0 comments on commit 815a580

Please sign in to comment.