Skip to content

JS: Add React Native Worklets "worklet" directive as a KnownDirective - #22307

Open
matinzd wants to merge 3 commits into
github:mainfrom
matinzd:patch-1
Open

JS: Add React Native Worklets "worklet" directive as a KnownDirective#22307
matinzd wants to merge 3 commits into
github:mainfrom
matinzd:patch-1

Conversation

@matinzd

@matinzd matinzd commented Aug 10, 2026

Copy link
Copy Markdown

Worklet is a short-running JavaScript function that can be moved and executed across different Javascript Runtimes. Reanimated uses React Native Worklets "worklet" to calculate view styles and react to events on the UI thread.

https://docs.swmansion.com/react-native-reanimated/docs/guides/worklets/

https://docs.swmansion.com/react-native-worklets/

cc: @tjzel from Software Mansion

@github-actions github-actions Bot added the JS label Aug 10, 2026
@matinzd
matinzd marked this pull request as ready for review August 10, 2026 11:08
@matinzd
matinzd requested a review from a team as a code owner August 10, 2026 11:08
Copilot AI balanced review requested due to automatic review settings August 10, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds React Native Reanimated’s worklet directive to JavaScript directive modeling.

Changes:

  • Adds WorkletDirective as a known directive.
  • Adds top-level and function-level test fixtures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
javascript/ql/lib/semmle/javascript/Stmt.qll Models the worklet directive.
javascript/ql/test/library-tests/Directives/tst.js Adds worklet test inputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread javascript/ql/test/library-tests/Directives/tst.js
Comment thread javascript/ql/lib/semmle/javascript/Stmt.qll Outdated
@matinzd
matinzd requested a balanced review from Copilot August 10, 2026 11:22
@matinzd matinzd changed the title Add React Native Reanimated worklet directive as KnownDirective Javascript: Add React Native Reanimated worklet directive as a KnownDirective Aug 10, 2026
@matinzd matinzd changed the title Javascript: Add React Native Reanimated worklet directive as a KnownDirective JS: Add React Native Reanimated worklet directive as a KnownDirective Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@matinzd matinzd changed the title JS: Add React Native Reanimated worklet directive as a KnownDirective JS: Add React Native Worklets "worklet" directive as a KnownDirective Aug 10, 2026
@matinzd

matinzd commented Aug 10, 2026

Copy link
Copy Markdown
Author

This is ready for review. Let me know if there needs to be changes @asgerf.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants