Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Mar 7, 2024
1 parent 4320da5 commit 219cdde
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/FsAutoComplete/CodeFixes/AddTypeAliasToSignatureFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ let fix
match node with
| SyntaxNode.SynTypeDefn(SynTypeDefn(
typeInfo = SynComponentInfo(longId = [ typeIdent ])
typeRepr = SynTypeDefnRepr.Simple(simpleRepr = SynTypeDefnSimpleRepr.TypeAbbrev _)
trivia = trivia) as tdn) when (Range.rangeContainsPos tdn.FullRange fcsPos) ->
let mFull = Range.unionRanges trivia.LeadingKeyword.Range tdn.FullRange
Some(typeIdent, mFull)
typeRepr = SynTypeDefnRepr.Simple(simpleRepr = SynTypeDefnSimpleRepr.TypeAbbrev _)) as tdn) when
(Range.rangeContainsPos tdn.FullRange fcsPos)
->
Some(typeIdent, tdn.FullRange)
| _ -> None)

match typeDefnInfo with
Expand Down Expand Up @@ -171,7 +171,8 @@ let fix
decls
// Skip open statements
|> List.tryFind (function
| SynModuleSigDecl.Open _ -> false
| SynModuleSigDecl.Open _
| SynModuleSigDecl.HashDirective _ -> false
| _ -> true)
|> Option.map (fun mdl ->
let offset =
Expand Down

0 comments on commit 219cdde

Please sign in to comment.