sam-goodwin / punchcard

Type-safe AWS infrastructure.
Apache License 2.0
506 stars 20 forks source link

toSNSTopic should return a Topic, not a CollectedTopic #145

Closed Jinxit closed 3 years ago

Jinxit commented 3 years ago

The stream processing part is not really necessary, and it would make type inference much simpler.

sam-goodwin commented 3 years ago

Thanks for trying punchcard and discovering this problem. I was encoding the Stream that produced the Topic in its type, but that messes with inference. This PR should fix this https://github.com/punchcard/punchcard/pull/146

Until I release, the workaround is to just cast your CollectedTopic to Topic<T>