Sha256: 0a7577ffd922cc629b654d185309d941aa331f0acd93a63b81cda625730d6e32

Contents?: true

Size: 1.03 KB

Versions: 5

Compression:

Stored size: 1.03 KB

Contents

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

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

      attr_reader mutex: Thread::Mutex

      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

5 entries across 5 versions & 1 rubygems

Version Path
steep-1.6.0 sig/steep/server/change_buffer.rbs
steep-1.6.0.pre.4 sig/steep/server/change_buffer.rbs
steep-1.6.0.pre.3 sig/steep/server/change_buffer.rbs
steep-1.6.0.pre.2 sig/steep/server/change_buffer.rbs
steep-1.6.0.pre.1 sig/steep/server/change_buffer.rbs