1 #pragma once
2 
3 #include <jsi/jsi.h>
4 #include <stdio.h>
5 #include <memory>
6 #include <unordered_map>
7 
8 namespace reanimated {
9 
10 using namespace facebook;
11 
12 class FrozenObject;
13 
14 class WorkletsCache {
15  private:
16   std::unordered_map<long long, std::shared_ptr<jsi::Function>> worklets;
17 
18  public:
19   std::shared_ptr<jsi::Function> getFunction(
20       jsi::Runtime &rt,
21       std::shared_ptr<reanimated::FrozenObject> frozenObj);
22 };
23 
24 } // namespace reanimated
25