---
title: Default Literal Types
framework: swift
role: collectionGroup
role_heading: API Collection
path: swift/default-literal-types
---

# Default Literal Types

Type aliases representing the concrete type that a literal takes when no other type information is provided.

## Overview

Overview This example declares the numberOfCookies constant, using an integer literal to express its value: let numberOfCookies = 5 // type(of: numberOfCookies) == Int.self When a literal expression is written with no type information, Swift uses these type aliases to determine what type to use for the expression. In this case, the numberOfCookies constant has the default type for an integer literal, Int, as designated by the IntegerLiteralType type alias.

## Topics

### Basic Values

- [BooleanLiteralType](swift/booleanliteraltype.md)
- [IntegerLiteralType](swift/integerliteraltype.md)
- [FloatLiteralType](swift/floatliteraltype.md)

### Strings and Text

- [StringLiteralType](swift/stringliteraltype.md)
- [ExtendedGraphemeClusterType](swift/extendedgraphemeclustertype.md)
- [UnicodeScalarType](swift/unicodescalartype.md)
