Skip to content

Commit

Permalink
Upgrade typescript to 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cannorin committed Aug 29, 2022
1 parent b7a7ef3 commit 4bc4360
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 57 deletions.
104 changes: 50 additions & 54 deletions lib/Bindings/TypeScript.fs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ module Ts =
abstract isImportEqualsDeclaration: node: Node -> bool
abstract isImportDeclaration: node: Node -> bool
abstract isImportClause: node: Node -> bool
abstract isImportTypeAssertionContainer: node: Node -> bool
abstract isAssertClause: node: Node -> bool
abstract isAssertEntry: node: Node -> bool
abstract isNamespaceImport: node: Node -> bool
Expand Down Expand Up @@ -657,6 +658,27 @@ module Ts =
abstract formatDiagnostic: diagnostic: Diagnostic * host: FormatDiagnosticsHost -> string
abstract formatDiagnosticsWithColorAndContext: diagnostics: Diagnostic[] * host: FormatDiagnosticsHost -> string
abstract flattenDiagnosticMessageText: diag: U2<string, DiagnosticMessageChain> option * newLine: string * ?indent: float -> string
/// Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
/// provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
abstract getModeForFileReference: ref: U2<FileReference, string> * containingFileMode: obj -> ModuleKind option
/// <summary>
/// Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
/// defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
/// If you have an actual import node, prefer using getModeForUsageLocation on the reference string node.
/// </summary>
/// <param name="file">File to fetch the resolution mode within</param>
/// <param name="index">Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations</param>
abstract getModeForResolutionAtIndex: file: SourceFile * index: float -> ModuleKind option
/// <summary>
/// Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
/// one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
/// Notably, this function always returns <c>undefined</c> if the containing file has an <c>undefined</c> <c>impliedNodeFormat</c> - this field is only set when
/// <c>moduleResolution</c> is <c>node16</c>+.
/// </summary>
/// <param name="file">The file the import or import-like reference is contained within</param>
/// <param name="usage">The module reference string</param>
/// <returns>The final resolution mode of the import</returns>
abstract getModeForUsageLocation: file: {| impliedNodeFormat: obj option |} * usage: StringLiteralLike -> ModuleKind option
abstract getConfigFileParsingDiagnostics: configFileParseResult: ParsedCommandLine -> Diagnostic[]
/// <summary>
/// A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
Expand Down Expand Up @@ -2178,37 +2200,37 @@ module Ts =
inherit Token<'TKind>

type DotToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type DotDotDotToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type QuestionToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type ExclamationToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type ColonToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type EqualsToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type AsteriskToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type EqualsGreaterThanToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type PlusToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type MinusToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type QuestionDotToken =
inherit PunctuationToken<SyntaxKind>
PunctuationToken<SyntaxKind>

type [<AllowNullLiteral>] KeywordToken<'TKind> =
inherit Token<'TKind>
Expand All @@ -2234,46 +2256,46 @@ module Ts =
inherit KeywordToken<'TKind>

type AbstractKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type AsyncKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type ConstKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type DeclareKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type DefaultKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type ExportKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type InKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type PrivateKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type ProtectedKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type PublicKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type ReadonlyKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type OutKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type OverrideKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

type StaticKeyword =
inherit ModifierToken<SyntaxKind>
ModifierToken<SyntaxKind>

[<Obsolete("Use `ReadonlyKeyword` instead.")>]
type ReadonlyToken =
Expand All @@ -2296,50 +2318,24 @@ module Ts =
| [<CompiledValue(124)>] StaticKeyword of StaticKeyword
[<Emit("$0.kind")>]
member _.kind : SyntaxKind = jsNative
static member inline op_ErasedCast(x: AbstractKeyword) = AbstractKeyword x
static member inline op_ErasedCast(x: AsyncKeyword) = AsyncKeyword x
static member inline op_ErasedCast(x: ConstKeyword) = ConstKeyword x
static member inline op_ErasedCast(x: DeclareKeyword) = DeclareKeyword x
static member inline op_ErasedCast(x: DefaultKeyword) = DefaultKeyword x
static member inline op_ErasedCast(x: ExportKeyword) = ExportKeyword x
static member inline op_ErasedCast(x: InKeyword) = InKeyword x
static member inline op_ErasedCast(x: OutKeyword) = OutKeyword x
static member inline op_ErasedCast(x: OverrideKeyword) = OverrideKeyword x
static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x
static member inline op_ErasedCast(x: StaticKeyword) = StaticKeyword x

type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] AccessibilityModifier =
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x

type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] ParameterPropertyModifier =
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
| [<CompiledValue(145)>] ReadonlyKeyword of ReadonlyKeyword
static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x

type [<TypeScriptTaggedUnion("kind")>] [<RequireQualifiedAccess>] ClassMemberModifier =
| [<CompiledValue(121)>] PrivateKeyword of PrivateKeyword
| [<CompiledValue(122)>] ProtectedKeyword of ProtectedKeyword
| [<CompiledValue(123)>] PublicKeyword of PublicKeyword
| [<CompiledValue(145)>] ReadonlyKeyword of ReadonlyKeyword
| [<CompiledValue(124)>] StaticKeyword of StaticKeyword
static member inline op_ErasedCast(x: PrivateKeyword) = PrivateKeyword x
static member inline op_ErasedCast(x: ProtectedKeyword) = ProtectedKeyword x
static member inline op_ErasedCast(x: PublicKeyword) = PublicKeyword x
static member inline op_ErasedCast(x: ReadonlyKeyword) = ReadonlyKeyword x
static member inline op_ErasedCast(x: StaticKeyword) = StaticKeyword x

type ModifiersArray =
Modifier[]
Expand Down Expand Up @@ -6720,7 +6716,7 @@ Use typeAcquisition.enable instead.")>]
[<Emit("$0($1...)")>] abstract Invoke: nodes: 'T[] * visitor: Visitor option * ?test: (Node -> bool) * ?start: float * ?count: float -> 'T[]
[<Emit("$0($1...)")>] abstract Invoke: nodes: 'T[] option * visitor: Visitor option * ?test: (Node -> bool) * ?start: float * ?count: float -> 'T[] option

type VisitResult<'T> =
type VisitResult<'T when 'T :> Node> =
U2<'T, 'T[]> option

type [<AllowNullLiteral>] Printer =
Expand Down Expand Up @@ -7751,8 +7747,8 @@ Use typeAcquisition.enable instead.")>]
abstract skipDestructiveCodeActions: bool option with get, set

type [<StringEnum>] [<RequireQualifiedAccess>] CompletionsTriggerCharacter =
| [<CompiledName(".")>] Dot
| [<CompiledName("\"")>] DoubleQuote
| [<CompiledName(".")>] Period
| [<CompiledName("\"")>] Backslash
| [<CompiledName("'")>] SingleQuote
| [<CompiledName("`")>] BackQuote
| [<CompiledName("/")>] Slash
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2352,9 +2352,9 @@ type-is@~1.6.18:
mime-types "~2.1.24"

[email protected]:
version "4.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4"
integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

[email protected], unpipe@~1.0.0:
version "1.0.0"
Expand Down

0 comments on commit 4bc4360

Please sign in to comment.