@@ -1346,6 +1346,7 @@ defmodule IEx.Helpers do
1346
1346
#PID<0.0.0>
1347
1347
1348
1348
"""
1349
+ @ spec pid ( binary | atom ) :: pid ( )
1349
1350
def pid ( "#PID<" <> string ) do
1350
1351
:erlang . list_to_pid ( ~c" <#{ string } " )
1351
1352
end
@@ -1373,6 +1374,7 @@ defmodule IEx.Helpers do
1373
1374
#PID<0.64.2048>
1374
1375
1375
1376
"""
1377
+ @ spec pid ( non_neg_integer , non_neg_integer , non_neg_integer ) :: pid ( )
1376
1378
def pid ( x , y , z )
1377
1379
when is_integer ( x ) and x >= 0 and is_integer ( y ) and y >= 0 and is_integer ( z ) and z >= 0 do
1378
1380
:erlang . list_to_pid (
@@ -1392,6 +1394,7 @@ defmodule IEx.Helpers do
1392
1394
1393
1395
"""
1394
1396
@ doc since: "1.8.0"
1397
+ @ spec port ( binary ) :: port ( )
1395
1398
def port ( string ) when is_binary ( string ) do
1396
1399
:erlang . list_to_port ( ~c" #Port<#{ string } >" )
1397
1400
end
@@ -1408,6 +1411,7 @@ defmodule IEx.Helpers do
1408
1411
1409
1412
"""
1410
1413
@ doc since: "1.8.0"
1414
+ @ spec port ( non_neg_integer , non_neg_integer ) :: port ( )
1411
1415
def port ( major , minor )
1412
1416
when is_integer ( major ) and major >= 0 and is_integer ( minor ) and minor >= 0 do
1413
1417
:erlang . list_to_port (
@@ -1425,6 +1429,7 @@ defmodule IEx.Helpers do
1425
1429
1426
1430
"""
1427
1431
@ doc since: "1.6.0"
1432
+ @ spec ref ( binary ) :: reference ( )
1428
1433
def ref ( string ) when is_binary ( string ) do
1429
1434
:erlang . list_to_ref ( ~c" #Ref<#{ string } >" )
1430
1435
end
@@ -1439,6 +1444,7 @@ defmodule IEx.Helpers do
1439
1444
1440
1445
"""
1441
1446
@ doc since: "1.6.0"
1447
+ @ spec ref ( non_neg_integer , non_neg_integer , non_neg_integer , non_neg_integer ) :: reference ( )
1442
1448
def ref ( w , x , y , z )
1443
1449
when is_integer ( w ) and w >= 0 and is_integer ( x ) and x >= 0 and is_integer ( y ) and y >= 0 and
1444
1450
is_integer ( z ) and z >= 0 do
0 commit comments