You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/ssh/sshConfig.ts:4:21 - error TS2614: Module '"ssh-config"' has no exported member 'Directive'. Did you mean to use 'import Directive from "ssh-config"' instead?
4 import SSHConfig, { Directive, Line, Section } from 'ssh-config';
~~~~~~~~~
src/ssh/sshConfig.ts:4:32 - error TS2614: Module '"ssh-config"' has no exported member 'Line'. Did you mean to use 'import Line from "ssh-config"' instead?
4 import SSHConfig, { Directive, Line, Section } from 'ssh-config';
~~~~
src/ssh/sshConfig.ts:4:38 - error TS2614: Module '"ssh-config"' has no exported member 'Section'. Did you mean to use 'import Section from "ssh-config"' instead?
4 import SSHConfig, { Directive, Line, Section } from 'ssh-config';
~~~~~~~
src/ssh/sshConfig.ts:49:37 - error TS2749: 'SSHConfig' refers to a value, but is being used as a type here. Did you mean 'typeof SSHConfig'?
49 function normalizeSSHConfig(config: SSHConfig) {
~~~~~~~~~
src/ssh/sshConfig.ts:68:45 - error TS2749: 'SSHConfig' refers to a value, but is being used as a type here. Did you mean 'typeof SSHConfig'?
68 const includedConfigs = new Map<number, SSHConfig>();
~~~~~~~~~
src/ssh/sshConfig.ts:97:36 - error TS2749: 'SSHConfig' refers to a value, but is being used as a type here. Did you mean 'typeof SSHConfig'?
97 constructor(private sshConfig: SSHConfig) {
It looks like a couple of issues
It expects SSHConfig to be a class, whereas this package exports a 'customised data value' or something (whatever it is, TypeScript doesn't like using it as a type).
Directive, Line, and Section are not exported
To address this, I would consider making parse and stringify static methods on the SSHConfig, which can be exported directly. Also, as they are reachable through params and return values, the Line, Match, Section, Directive, Comment, FindOptions, and MatchOptions interfaces should be exported. MatchParams and ComputeContext specifically should not be exported, as they are for internal .compute logic.
The text was updated successfully, but these errors were encountered:
Hi again,
In trying to use the new release in https://github.com/jeanp413/open-remote-ssh, there are several TypeScript errors due to how it is currently consumed by that package. This is the relevant file.
It looks like a couple of issues
SSHConfig
to be a class, whereas this package exports a 'customised data value' or something (whatever it is, TypeScript doesn't like using it as a type).Directive
,Line
, andSection
are not exportedTo address this, I would consider making
parse
andstringify
static methods on theSSHConfig
, which can be exported directly. Also, as they are reachable through params and return values, theLine
,Match
,Section
,Directive
,Comment
,FindOptions
, andMatchOptions
interfaces should be exported.MatchParams
andComputeContext
specifically should not be exported, as they are for internal.compute
logic.The text was updated successfully, but these errors were encountered: