# Type Projection

DevFeed: [Type Projection](<https://devfeed.tech/articles/type-projection-25028.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/type-projection/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-12-27T18:18:01Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [declaration-site-variance](<https://devfeed.tech/tags/declaration-site-variance.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [object](<https://devfeed.tech/tags/object.md>), [operations](<https://devfeed.tech/tags/operations.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type-projection](<https://devfeed.tech/tags/type-projection.md>), [use-site-variance](<https://devfeed.tech/tags/use-site-variance.md>), [variance](<https://devfeed.tech/tags/variance.md>)

## AI overview

This tutorial explains Kotlin type projection as a restricted view of an existing type that enables variance and subtyping in specific contexts. It describes how use-site variance produces projections and how projections can restrict operations such as setters.

## Source excerpt

A type projection is a type that has been limited in certain ways in order to gain variance characteristics. Imagine a three-dimensional object that you shine a flashlight onto. Behind that object on the wall is a two-dimensional projection of that object - a shadow. That projection has the same basic shape as the object, but only from one perspective. Type projection is kind of like that - we take an existing object and reduce it to just the attributes or operations that we need at that place in the code.