1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4 5 package types
6 7 // A Type represents a type of Go.
8 // All types implement the Type interface.
9 type Type interface {
10 // Underlying returns the underlying type of a type.
11 // Underlying types are never Named, TypeParam, or Alias types.
12 //
13 // See https://go.dev/ref/spec#Underlying_types.
14 Underlying() Type
15 16 // String returns a string representation of a type.
17 String() string
18 }
19