Skip to content

hamlet-framework/tuples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamlet Framework / Tuples

This is PoC implementation of type safe tuples. Typical use case would be:

$t = tuple(new DateTime, ['a' => 1], 33, false, null, fopen(__FILE__, 'r'));

with psalm being able to deduce the type of $t:

Tuple6<DateTime, array{a: int(1)}, int(33), false, null, false|resource>

as well as the types of expressions like:

$t->at0()->getTimestamp();
$t->at2() + 45;

Releases

No releases published

Packages

No packages published

Languages