1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibJS: Move 'typeof' string functionality from AST to Value

We should be able to get the 'typeof' string for any value directly, so
this is now a standalone Value::typeof() method instead of being part of
UnaryExpression::execute().
This commit is contained in:
Linus Groh 2021-04-02 20:33:03 +02:00 committed by Andreas Kling
parent dc6db819f9
commit d6cffb82a2
3 changed files with 31 additions and 30 deletions

View file

@ -303,6 +303,8 @@ public:
return *this;
}
String typeof() const;
private:
Type m_type { Type::Empty };