Sha256: 841cf89d8bd756c753cd5ae3b267fff2d431cd23e79585f7458aa1a2706d4d13

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 KB

Contents

module Steep
  module Server
    module ChangeBuffer : _WithProject, _WithMutex
      interface _WithProject
        def project: () -> Project
      end

      interface _WithMutex
        def mutex: () -> Mutex
      end

      type changes = Hash[Pathname, Array[Services::ContentChange]]

      attr_reader buffered_changes: changes

      # Yields `buffered_changes` to modify with synchronization
      #
      def push_buffer: [A] () { (changes) -> A } -> A

      # Yields or returns a copy of `buffered_changes` after clearing `buffered_changes` content
      #
      def pop_buffer: [A] () { (changes) -> A } -> A
                    | () -> changes

      # Load files from `project` to `buffered_changes`
      #
      def load_files: (project: Project, commandline_args: Array[String]) -> void

      # Load changes from a request with `DidChangeTextDocumentParams` into `buffered_changes`
      #
      def collect_changes: (untyped request) -> void

      # Reset the content of `uri` to `text`
      #
      def reset_change: (uri: String, text: String) -> void
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
steep-1.7.0.dev.3 sig/steep/server/change_buffer.rbs
steep-1.7.0.dev.2 sig/steep/server/change_buffer.rbs
steep-1.7.0.dev.1 sig/steep/server/change_buffer.rbs