When there are syntax errors in the code, it really helps to spell out what you’re trying to do, because it’s hard for other people to understand the intention behind the code otherwise. Can you confirm what you are trying to do here?
My guess is you are trying to wrap a string in a custom type so that you can’t pass any old string instead of a room ID? The rest of this answer assumes that.
The correct syntax is:
type RoomId = RoomId String
The first RoomId is the name of a type, and the second RoomId is a type constructor.
You could also write:
type RoomId = RoomIdConstructor String
In Elm, types and type constructors exist in different namespaces, so you can use the same name for both and the compiler never gets them mixed up. People often do this. It saves you thinking of another name, and it’s so common in Elm code that you get used to it quickly. Confusing for beginners though!
You can also use the type constructor as a function. You apply it to a String and it gives you back a RoomId.
So why didn’t your version work?
RoomID : String
The : syntax applies a type to a value. So the compiler expects a value on the left and a type on the right. But you are giving it a type on both sides, so that’s an error.
If you actually wanted to say “all values of type RoomID are also type String”, then this would mean RoomID is just an alias for String, and you would use the type alias syntax, as @DanAbrams mentioned.
Hope this helps, feel free to ask further questions otherwise! 