Treesitter: query that matches nodes in embedded language (Vue)

The Vue tree-sitter parser sets the injection language depending on how the is used:

; <script lang="ts">
        (attribute_name) @_lang
        (quoted_attribute_value (attribute_value) @_ts)))
    (raw_text) @injection.content)
    (#eq? @_lang "lang")
    (#eq? @_ts "ts")
    (#set! injection.language "typescript"))

This works great for highlighting, folds, etc. But when using treesitter-textobjects ( I cannot jump to any of the text objects that I can for the language that is being set by (#set! injection.language "typescript") in the Vue tree-sitter injection.

Is there any way I can write a query that can match something like (function_declaration) @function after the injection language is set? The vue treesitter parser ( seems to only support the template nodes.

I tried something like:

      ) @tag
       (attribute_name) @lang_key (#match? @lang_key "lang")
      (quoted_attribute_value) @_lang (#match? @_lang "ts") 
    ) @attr
    ) @start
  (raw_text) @raw
  (#set! injection.language "javascript")
  (function_identifier) @func

Which results in the following error:

/usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:248: Query error at 13:4. Invalid node type "function_identifier":
  (function_identifier) @_func

Thanks for your time.