GenericTypeAliasImpl constructor

GenericTypeAliasImpl({
  1. required CommentImpl? comment,
  2. required List<AnnotationImpl>? metadata,
  3. required Token typedefKeyword,
  4. required Token name,
  5. required TypeParameterListImpl? typeParameters,
  6. required Token equals,
  7. required TypeAnnotationImpl type,
  8. required Token semicolon,
})

Returns a newly created generic type alias. Either or both of the comment and metadata can be null if the variable list does not have the corresponding attribute. The typeParameters can be null if there are no type parameters.

Implementation

GenericTypeAliasImpl({
  required super.comment,
  required super.metadata,
  required super.typedefKeyword,
  required super.name,
  required TypeParameterListImpl? typeParameters,
  required this.equals,
  required TypeAnnotationImpl type,
  required super.semicolon,
})  : _typeParameters = typeParameters,
      _type = type {
  _becomeParentOf(_typeParameters);
  _becomeParentOf(_type);
}