Skip to content

Commit 7643307

Browse files
committed
Fixed tc
1 parent fa54201 commit 7643307

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
## v2.2.9
66

7+
* Added [Sorbet](https://sorbet.org/) method signatures.
78
* Always use DTS module type when calling JsRoutes.definitions or .definitions!. [#313](https://github.com/railsware/js-routes/issues/313)
89

910
## v2.2.8
@@ -34,10 +35,10 @@
3435
## v2.2.3
3536

3637
* Fixed NIL module type namespace defintion [#297](https://github.com/railsware/js-routes/issues/297).
37-
* The patch may cause a problem with nested `namespace` option
38+
* The patch may cause a problem with nested `namespace` option.
3839
* Ex. Value like `MyProject.Routes` requires to define `window.MyProject` before importing the routes file
3940

40-
## v2.2.2.
41+
## v2.2.2
4142

4243
* Fix custom file path [#295](https://github.com/railsware/js-routes/issues/295)
4344

lib/js_routes/configuration.rb

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ class Configuration
77
include JsRoutes::Types
88
extend T::Sig
99

10-
DEFAULTS = T.let({
11-
namespace: nil,
12-
exclude: [],
13-
include: [//],
14-
file: nil,
15-
prefix: -> { Rails.application.config.relative_url_root || "" },
16-
url_links: false,
17-
camel_case: false,
18-
default_url_options: {},
19-
compact: false,
20-
serializer: nil,
21-
special_options_key: "_options",
22-
application: -> { Rails.application },
23-
module_type: 'ESM',
24-
documentation: true,
25-
}, T::Hash[Symbol, T.untyped]) #:nodoc:
26-
2710
sig { returns(T.nilable(String)) }
2811
attr_accessor :namespace
2912
sig { returns(Clusivity) }

lib/js_routes/route.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ class Route #:nodoc:
3232

3333
sig { params(configuration: JsRoutes::Configuration, route: JourneyRoute, parent_route: T.nilable(JourneyRoute)).void }
3434
def initialize(configuration, route, parent_route = nil)
35-
@configuration = T.let(configuration, JsRoutes::Configuration)
36-
@route = T.let(route, JourneyRoute)
37-
@parent_route = T.let(parent_route, T.nilable(JourneyRoute))
35+
@configuration = configuration
36+
@route = route
37+
@parent_route = parent_route
3838
end
3939

4040
sig { returns(T::Array[StringArray]) }

0 commit comments

Comments
 (0)