# Token - Documentation

# Token

#### new Token(type, content, aliasopt, matchedStropt)

Source:
  - prism-core.js, line 741

Creates a new token.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`type` | string |  |  | See `type`
`content` | string | TokenStream |  |  | See `content`
`alias` | string | Array.<string> | <optional> |  | The alias(es) of the token.
`matchedStr` | string | <optional> | `""` | A copy of the full string this token was created from.

### Members

#### alias :string|Array.<string>

Source:
  - prism-core.js, line 768
See:
  - GrammarToken

The alias(es) of the token.

##### Type:

- string | Array.<string>

#### content :string|TokenStream

Source:
  - prism-core.js, line 760

The strings or tokens contained by this token.

This will be a token stream if the pattern matched also defined an `inside` grammar.

##### Type:

- string | TokenStream

#### type :string

Source:
  - prism-core.js, line 751
See:
  - GrammarToken

The type of the token.

This is usually the key of a pattern in a `Grammar`.

##### Type:

- string