Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

XCAssets: added explicit type to allValues array #69

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ enum XCTImages {
}
}

static let allValues = [
static let allValues: [XCTImagesType] = [
Exotic.Banana,
Exotic.Mango,
Private,
Expand Down
2 changes: 1 addition & 1 deletion Tests/Expected/XCAssets/swift2-context-defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ enum Asset {
}
}

static let allValues = [
static let allValues: [AssetType] = [
Exotic.Banana,
Exotic.Mango,
Private,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ enum XCTImages {
}
}

static let allValues = [
static let allValues: [XCTImagesType] = [
Exotic.banana,
Exotic.mango,
`private`,
Expand Down
2 changes: 1 addition & 1 deletion Tests/Expected/XCAssets/swift3-context-defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ enum Asset {
}
}

static let allValues = [
static let allValues: [AssetType] = [
Exotic.banana,
Exotic.mango,
`private`,
Expand Down
2 changes: 1 addition & 1 deletion templates/xcassets/swift2.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct {{enumName}}Type: StringLiteralConvertible {
{{sp}} {% call casesBlock images sp %}
{{sp}} {% if not param.noAllValues %}

{{sp}} static let allValues = [
{{sp}} static let allValues: [{{enumName}}Type] = [
{{sp}} {% set sp2 %}{{sp}} {% endset %}
{{sp}} {% call allValuesBlock images "" false sp2 %}
{{sp}} ]
Expand Down
2 changes: 1 addition & 1 deletion templates/xcassets/swift3.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct {{enumName}}Type: ExpressibleByStringLiteral {
{{sp}} {% call casesBlock images sp %}
{{sp}} {% if not param.noAllValues %}

{{sp}} static let allValues = [
{{sp}} static let allValues: [{{enumName}}Type] = [
{{sp}} {% set sp2 %}{{sp}} {% endset %}
{{sp}} {% call allValuesBlock images "" false sp2 %}
{{sp}} ]
Expand Down