Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2aa4fe

Browse files
MasterAMjosevalim
authored andcommitted
Fix outdated link to String.t typespec note (elixir-lang#1168)
1 parent f017443 commit a2aa4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getting-started/typespecs-and-behaviours.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ defmodule LousyCalculator do
4747
end
4848
```
4949

50-
As you can see in the example, tuples are a compound type and each tuple is identified by the types inside it. To understand why `String.t` is not written as `string`, have another look at the [notes in the typespecs docs](https://hexdocs.pm/elixir/typespecs.html#notes).
50+
As you can see in the example, tuples are a compound type and each tuple is identified by the types inside it. To understand why `String.t` is not written as `string`, have another look at the [typespecs docs](https://hexdocs.pm/elixir/typespecs.html#the-string-type).
5151

5252
Defining function specs this way works, but it quickly becomes annoying since we're repeating the type `{number, String.t}` over and over. We can use the `@type` directive in order to declare our own custom type.
5353

0 commit comments

Comments
 (0)