QL code and tests for C#/C++/JavaScript.

This commit is contained in:
Pavel Avgustinov
2018-08-02 17:53:23 +01:00
commit b55526aa58
10684 changed files with 581163 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
+ semmlecode-javascript-queries/meta/analysis-quality/UnpromotedRouteSetupCandidate.ql: /analysis-quality
+ semmlecode-javascript-queries/meta/analysis-quality/UnpromotedRouteHandlerCandidate.ql: /analysis-quality

View File

@@ -0,0 +1,5 @@
@import "correctness-core"
@import "frameworks-core"
@import "maintainability-core"
@import "metrics-core"
@import "readability-core"

View File

@@ -0,0 +1,12 @@
+ semmlecode-javascript-queries/Declarations/BuiltinRedefined.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/InefficientMethodDefinition.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Expressions/BadParityCheck.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/HapaxLegomenon.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/JSDoc/UnknownTagType.ql: /Readability/JSDoc
+ semmlecode-javascript-queries/JSLint/InvalidJSLintDirective.ql: /Frameworks/JSLint
+ semmlecode-javascript-queries/JSLint/MalformedJSLintDirective.ql: /Frameworks/JSLint
+ semmlecode-javascript-queries/LanguageFeatures/MultilineStringLiteral.ql: /Readability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/ReservedWords.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/TrailingComma.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/OctalLiteral.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/StandardLibrary/ParseIntRadix.ql: /Maintainability/Standard Library

View File

@@ -0,0 +1,2 @@
@import "correctness-core"
@import "correctness-more"

View File

@@ -0,0 +1,39 @@
+ semmlecode-javascript-queries/Declarations/AssignmentToConst.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/ClobberingVarInit.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/ConflictingFunctions.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/DefaultArgumentReferencesNestedFunction.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/MixedStaticInstanceThisAccess.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/TemporalDeadZone.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/UniqueParameterNames.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/UniquePropertyNames.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/Declarations/IneffectiveParameterType.ql: /Correctness/Declarations
+ semmlecode-javascript-queries/DOM/AmbiguousIdAttribute.ql: /Correctness/DOM
+ semmlecode-javascript-queries/DOM/ConflictingAttributes.ql: /Correctness/DOM
+ semmlecode-javascript-queries/DOM/MalformedIdAttribute.ql: /Correctness/DOM
+ semmlecode-javascript-queries/Expressions/ComparisonWithNaN.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/CompareIdenticalValues.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/DuplicateCondition.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/DuplicateSwitchCase.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/HeterogeneousComparison.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/MisspelledVariableName.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/MissingDotLengthInComparison.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/ShiftOutOfRange.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/RedundantExpression.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/LanguageFeatures/BadTypeof.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/InvalidPrototype.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/LengthComparisonOffByOne.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/NonLinearPattern.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/PropertyWriteOnPrimitive.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/StrictModeCallStackIntrospection.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/SyntaxError.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/TemplateSyntaxInStringLiteral.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/ThisBeforeSuper.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/RegExp/BackrefBeforeGroup.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/BackrefIntoNegativeLookahead.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/DuplicateCharacterInCharacterClass.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/EmptyCharacterClass.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/UnboundBackref.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/UnmatchableCaret.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/RegExp/UnmatchableDollar.ql: /Correctness/Regular Expressions
+ semmlecode-javascript-queries/Statements/InconsistentLoopOrientation.ql: /Correctness/Statements
+ semmlecode-javascript-queries/Statements/UnreachableStatement.ql: /Correctness/Statements

View File

@@ -0,0 +1,16 @@
+ semmlecode-javascript-queries/Expressions/BitwiseSignCheck.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/ExprHasNoEffect.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/SelfAssignment.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/StringInsteadOfRegex.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/SuspiciousInvocation.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/SuspiciousPropAccess.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/UnboundEventHandlerReceiver.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/UnknownDirective.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/Expressions/WhitespaceContradictsPrecedence.ql: /Correctness/Expressions
+ semmlecode-javascript-queries/LanguageFeatures/IllegalInvocation.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/InconsistentNew.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/SpuriousArguments.ql: /Correctness/Language Features
+ semmlecode-javascript-queries/Statements/MisleadingIndentationAfterControlStmt.ql: /Correctness/Statements
+ semmlecode-javascript-queries/Statements/ReturnOutsideFunction.ql: /Correctness/Statements
+ semmlecode-javascript-queries/Statements/SuspiciousUnusedLoopIterationVariable.ql: /Correctness/Statements
+ semmlecode-javascript-queries/Statements/UselessConditional.ql: /Correctness/Statements

View File

@@ -0,0 +1,2 @@
+ semmlecode-javascript-queries/Metrics/Dependencies/ExternalDependencies.ql
+ semmlecode-javascript-queries/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql

View File

@@ -0,0 +1,2 @@
@import "frameworks-core"
@import "frameworks-more"

View File

@@ -0,0 +1,25 @@
+ semmlecode-javascript-queries/AngularJS/DeadAngularJSEventListener.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/DependencyMismatch.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/DisablingSce.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/DoubleCompilation.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/IncompatibleService.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/DuplicateDependency.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/InsecureUrlWhitelist.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/MissingExplicitInjection.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/UnusedAngularDependency.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/RepeatedInjection.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/AngularJS/UseNgSrc.ql: /Frameworks/AngularJS
+ semmlecode-javascript-queries/DOM/Alert.ql: /Frameworks/DOM
+ semmlecode-javascript-queries/DOM/PseudoEval.ql: /Frameworks/DOM
+ semmlecode-javascript-queries/NodeJS/CyclicImport.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/NodeJS/DubiousImport.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/NodeJS/InvalidExport.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/NodeJS/MissingExports.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/NodeJS/UnusedDependency.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/NodeJS/UnresolvableImport.ql: /Frameworks/Node.js
+ semmlecode-javascript-queries/React/DirectStateMutation.ql: /Frameworks/React
+ semmlecode-javascript-queries/React/InconsistentStateUpdate.ql: /Frameworks/React
+ semmlecode-javascript-queries/React/UnsupportedStateUpdateInLifecycleMethod.ql: /Frameworks/React
+ semmlecode-javascript-queries/React/UnusedOrUndefinedStateProperty.ql: /Frameworks/React
+ semmlecode-javascript-queries/Electron/DisablingWebSecurity.ql: /Frameworks/Electron
+ semmlecode-javascript-queries/Electron/AllowRunningInsecureContent.ql: /Frameworks/Electron

View File

@@ -0,0 +1,2 @@
@import "maintainability-core"
@import "maintainability-more"

View File

@@ -0,0 +1,12 @@
+ semmlecode-javascript-queries/Declarations/ArgumentsRedefined.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/MissingThisQualifier.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/MissingVarDecl.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/DOM/DuplicateAttributes.ql: /Maintainability/DOM
+ semmlecode-javascript-queries/Expressions/DuplicateProperty.ql: /Maintainability/Expressions
+ semmlecode-javascript-queries/LanguageFeatures/DebuggerStatement.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/DeleteVar.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/ExpressionClosures.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/ForInComprehensionBlocks.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/HTMLComments.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/YieldInNonGenerator.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/Performance/ReDoS.ql: /Maintainability/Performance

View File

@@ -0,0 +1,26 @@
+ semmlecode-javascript-queries/Comments/CommentedOutCode.ql: /Maintainability/Comments
+ semmlecode-javascript-queries/Comments/TodoComments.ql: /Maintainability/Comments
+ semmlecode-javascript-queries/Declarations/DeadStoreOfGlobal.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/DeadStoreOfLocal.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/DuplicateVarDecl.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/UnusedParameter.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/Declarations/UnusedVariable.ql: /Maintainability/Declarations
+ semmlecode-javascript-queries/LanguageFeatures/ArgumentsCallerCallee.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/ConditionalComments.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/Eval.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/JumpFromFinally.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/SemicolonInsertion.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/SetterReturn.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/SetterIgnoresParameter.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/WithStatement.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/LanguageFeatures/WrongExtensionJSON.ql: /Maintainability/Language Features
+ semmlecode-javascript-queries/Performance/NonLocalForIn.ql: /Maintainability/Performance
+ semmlecode-javascript-queries/Performance/ReassignParameterAndUseArguments.ql: /Maintainability/Performance
+ semmlecode-javascript-queries/RegExp/MalformedRegExp.ql: /Maintainability/Regular Expressions
+ semmlecode-javascript-queries/Statements/ImplicitReturn.ql: /Maintainability/Statements
+ semmlecode-javascript-queries/Statements/InconsistentReturn.ql: /Maintainability/Statements
+ semmlecode-javascript-queries/Statements/NestedLoopsSameVariable.ql: /Maintainability/Statements
+ semmlecode-javascript-queries/external/DuplicateFunction.ql: /Maintainability/Duplicate Code
+ semmlecode-javascript-queries/external/DuplicateToplevel.ql: /Maintainability/Duplicate Code
+ semmlecode-javascript-queries/external/SimilarFunction.ql: /Maintainability/Duplicate Code
+ semmlecode-javascript-queries/external/SimilarToplevel.ql: /Maintainability/Duplicate Code

View File

@@ -0,0 +1,2 @@
@import "metrics-core"
@import "metrics-more"

View File

@@ -0,0 +1,2 @@
+ semmlecode-javascript-queries/Metrics/FLinesOfCode.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FLinesOfComment.ql: /Metrics/Documentation

View File

@@ -0,0 +1,13 @@
+ semmlecode-javascript-queries/Comments/FCommentedOutCode.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FFunctions.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FNumberOfStatements.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FCyclomaticComplexity.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FCommentRatio.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FUseOfES6.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FNumberOfTests.ql: /Metrics/Files
+ semmlecode-javascript-queries/Metrics/FLinesOfDuplicatedCode.ql: /Metrics/Duplication
+ semmlecode-javascript-queries/Metrics/FLinesOfSimilarCode.ql: /Metrics/Duplication
+ semmlecode-javascript-queries/Metrics/FunLinesOfCode.ql: /Metrics/Functions
+ semmlecode-javascript-queries/Metrics/FunCyclomaticComplexity.ql: /Metrics/Functions

View File

@@ -0,0 +1,22 @@
+ semmlecode-javascript-queries/Declarations/AssignmentToConst.ql: /Quick Wins
+ semmlecode-javascript-queries/Declarations/ConflictingFunctions.ql: /Quick Wins
+ semmlecode-javascript-queries/Declarations/DefaultArgumentReferencesNestedFunction.ql: /Quick Wins
+ semmlecode-javascript-queries/Declarations/TemporalDeadZone.ql: /Quick Wins
+ semmlecode-javascript-queries/Expressions/ComparisonWithNaN.ql: /Quick Wins
+ semmlecode-javascript-queries/Expressions/DuplicateCondition.ql: /Quick Wins
+ semmlecode-javascript-queries/Expressions/DuplicateSwitchCase.ql: /Quick Wins
+ semmlecode-javascript-queries/Expressions/HeterogeneousComparison.ql: /Quick Wins
+ semmlecode-javascript-queries/Expressions/ShiftOutOfRange.ql: /Quick Wins
+ semmlecode-javascript-queries/LanguageFeatures/BadTypeof.ql: /Quick Wins
+ semmlecode-javascript-queries/LanguageFeatures/NonLinearPattern.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/BackrefBeforeGroup.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/BackrefIntoNegativeLookahead.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/DuplicateCharacterInCharacterClass.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/EmptyCharacterClass.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/UnboundBackref.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/UnmatchableCaret.ql: /Quick Wins
+ semmlecode-javascript-queries/RegExp/UnmatchableDollar.ql: /Quick Wins
+ semmlecode-javascript-queries/Statements/InconsistentLoopOrientation.ql: /Quick Wins
# Metrics
+ semmlecode-javascript-queries/Metrics/FLinesOfCode.ql: /Quick Wins

View File

@@ -0,0 +1,2 @@
@import "readability-core"
@import "readability-more"

View File

@@ -0,0 +1,10 @@
+ semmlecode-javascript-queries/Expressions/ImplicitOperandConversion.ql: /Readability/Expressions
+ semmlecode-javascript-queries/Expressions/MissingSpaceInAppend.ql: /Readability/Expressions
+ semmlecode-javascript-queries/Expressions/MisspelledIdentifier.ql: /Readability/Expressions
+ semmlecode-javascript-queries/JSDoc/BadParamTag.ql: /Readability/JSDoc
+ semmlecode-javascript-queries/JSDoc/JSDocForNonExistentParameter.ql: /Readability/JSDoc
+ semmlecode-javascript-queries/JSDoc/UndocumentedParameter.ql: /Readability/JSDoc
+ semmlecode-javascript-queries/Statements/LabelInCase.ql: /Readability/Statements
+ semmlecode-javascript-queries/Statements/DanglingElse.ql: /Readability/Statements
+ semmlecode-javascript-queries/Statements/ReturnAssignsLocal.ql: /Readability/Statements
+ semmlecode-javascript-queries/Statements/EphemeralLoop.ql: /Readability/Statements

View File

@@ -0,0 +1,5 @@
+ semmlecode-javascript-queries/Declarations/DeclBeforeUse.ql: /Readability/Declarations
+ semmlecode-javascript-queries/Declarations/RedeclaredVariable.ql: /Readability/Declarations
+ semmlecode-javascript-queries/Declarations/TooManyParameters.ql: /Readability/Declarations
+ semmlecode-javascript-queries/LanguageFeatures/EmptyArrayInit.ql: /Readability/Language Features
+ semmlecode-javascript-queries/RegExp/BackspaceEscape.ql: /Readability/Regular Expressions

View File

@@ -0,0 +1,30 @@
+ semmlecode-javascript-queries/DOM/TargetBlank.ql: /Security/CWE/CWE-200
+ semmlecode-javascript-queries/Security/CWE-022/TaintedPath.ql: /Security/CWE/CWE-022
+ semmlecode-javascript-queries/Security/CWE-078/CommandInjection.ql: /Security/CWE/CWE-078
+ semmlecode-javascript-queries/Security/CWE-079/ReflectedXss.ql: /Security/CWE/CWE-079
+ semmlecode-javascript-queries/Security/CWE-079/Xss.ql: /Security/CWE/CWE-079
+ semmlecode-javascript-queries/Security/CWE-089/SqlInjection.ql: /Security/CWE/CWE-089
+ semmlecode-javascript-queries/Security/CWE-094/CodeInjection.ql: /Security/CWE/CWE-094
+ semmlecode-javascript-queries/Security/CWE-116/IncompleteSanitization.ql: /Security/CWE/CWE-116
+ semmlecode-javascript-queries/Security/CWE-134/TaintedFormatString.ql: /Security/CWE/CWE-134
+ semmlecode-javascript-queries/Security/CWE-209/StackTraceExposure.ql: /Security/CWE/CWE-209
+ semmlecode-javascript-queries/Security/CWE-312/CleartextStorage.ql: /Security/CWE/CWE-312
+ semmlecode-javascript-queries/Security/CWE-313/PasswordInConfigurationFile.ql: /Security/CWE/CWE-313
+ semmlecode-javascript-queries/Security/CWE-327/BrokenCryptoAlgorithm.ql: /Security/CWE/CWE-327
+ semmlecode-javascript-queries/Security/CWE-338/InsecureRandomness.ql: /Security/CWE/CWE-338
+ semmlecode-javascript-queries/Security/CWE-346/CorsMisconfigurationForCredentials.ql: /Security/CWE/CWE-346
+ semmlecode-javascript-queries/Security/CWE-352/MissingCsrfMiddleware.ql: /Security/CWE/CWE-352
+ semmlecode-javascript-queries/Security/CWE-400/RemotePropertyInjection.ql: /Security/CWE/CWE-400
+ semmlecode-javascript-queries/Security/CWE-502/UnsafeDeserialization.ql: /Security/CWE/CWE-502
+ semmlecode-javascript-queries/Security/CWE-601/ClientSideUrlRedirect.ql: /Security/CWE/CWE-601
+ semmlecode-javascript-queries/Security/CWE-601/ServerSideUrlRedirect.ql: /Security/CWE/CWE-601
+ semmlecode-javascript-queries/Security/CWE-611/Xxe.ql: /Security/CWE/CWE-611
+ semmlecode-javascript-queries/Security/CWE-643/XpathInjection.ql: /Security/CWE/CWE-643
+ semmlecode-javascript-queries/Security/CWE-730/RegExpInjection.ql: /Security/CWE/CWE-730
+ semmlecode-javascript-queries/Security/CWE-770/MissingRateLimiting.ql: /Security/CWE/CWE-770
+ semmlecode-javascript-queries/Security/CWE-776/XmlBomb.ql: /Security/CWE/CWE-776
+ semmlecode-javascript-queries/Security/CWE-798/HardcodedCredentials.ql: /Security/CWE/CWE-798
+ semmlecode-javascript-queries/Security/CWE-807/ConditionalBypass.ql: /Security/CWE/CWE-807
+ semmlecode-javascript-queries/Security/CWE-807/DifferentKindsComparisonBypass.ql: /Security/CWE/CWE-807
+ semmlecode-javascript-queries/Security/CWE-843/TypeConfusionThroughParameterTampering.ql: /Security/CWE/CWE-834
+ semmlecode-javascript-queries/Security/CWE-916/InsufficientPasswordHash.ql: /Security/CWE/CWE-916

View File

@@ -0,0 +1,2 @@
@import "security"
@import "security-extra"

View File

@@ -0,0 +1 @@
+ semmlecode-javascript-queries/Security/CWE-451/MissingXFrameOptions.ql: /Security/CWE/CWE-451

View File

@@ -0,0 +1,3 @@
# DO NOT EDIT
# This is a stub file. The actual suite of queries to run is generated
# automatically based on query precision and severity.

View File

@@ -0,0 +1,3 @@
@import "javascript-util-lgtm"
@import "javascript-alerts-lgtm"
@import "javascript-metrics-lgtm"

View File

@@ -0,0 +1,18 @@
+ semmlecode-javascript-queries/Comments/FCommentedOutCode.ql: /Metrics/Files
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/FLinesOfCode.ql: /Metrics/Files
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/FLinesOfComment.ql: /Metrics/Documentation
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/FLinesOfDuplicatedCode.ql: /Metrics/Duplication
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/FLinesOfSimilarCode.ql: /Metrics/Duplication
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/FNumberOfTests.ql: /Metrics/Files
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/Dependencies/ExternalDependencies.ql
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/Metrics/Dependencies/ExternalDependenciesSourceLinks.ql
@_namespace com.lgtm/javascript-queries

View File

@@ -0,0 +1,6 @@
+ semmlecode-javascript-queries/definitions.ql
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/AlertSuppression.ql
@_namespace com.lgtm/javascript-queries
+ semmlecode-javascript-queries/filters/ClassifyFiles.ql
@_namespace com.lgtm/javascript-queries

View File

@@ -0,0 +1,8 @@
This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,15 @@
This directory contains externs definitions for improving the precision of some of the JavaScript analyses.
Externs are organized into five categories, corresponding to the subdirectories of this directory:
* `es`: Externs definitions for the ECMAScript language standard; imported from the `externs` directory of the Google Closure Compiler source tree (https://github.com/google/closure-compiler), revision 6b81fd0bebe9b2560b55a37b880156465d045247.
* `web`: Externs definitions for various web standards and browser-specific extensions; imported from the same source.
* `vm`: Externs definitions for specific JavaScript VMs; also imported from the same source.
* `nodejs`: Externs definitions for common Node.js modules; generated from the TypeScript type definitions for Node.js provided by [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped), revision 28d94377786d6da325b76614aa4c1849dc05703e, with a few custom extensions.
* `lib`: Externs definitions for popular JavaScript libraries.
See the individual files for copyright and licensing information.

View File

@@ -0,0 +1,17 @@
/*
* Copyright 2016 Semmle
*/
/**
* @fileoverview Definitions for ECMAScript 2016.
* @see http://www.ecma-international.org/ecma-262/7.0/
* @externs
*/
/**
* @param {*} searchElement
* @param {number=} fromIndex
* @return {boolean}
* @nosideeffects
*/
Array.prototype.includes = function(searchElement, fromIndex) {};

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2016 Semmle
*/
/**
* @fileoverview Definitions approved for inclusion in ECMAScript 2017.
* @see https://github.com/tc39/proposals/blob/master/finished-proposals.md
* @externs
*/
/**
* @param {*} obj
* @return {!Array}
* @nosideeffects
*/
Object.values = function(obj) {};
/**
* @param {*} obj
* @return {!Array.<Array>}
* @nosideeffects
*/
Object.entries = function(obj) {};
/**
* @param {number} maxLength
* @param {string=} fillString
* @return {string}
* @nosideeffects
*/
String.prototype.padStart = function(maxLength, fillString) {};
/**
* @param {number} maxLength
* @param {string=} fillString
* @return {string}
* @nosideeffects
*/
String.prototype.padEnd = function(maxLength, fillString) {};
/**
* @param {!Object} obj
* @return {!Array.<!ObjectPropertyDescriptor>}
* @nosideeffects
*/
Object.getOwnPropertyDescriptors = function(obj) {};

2398
javascript/externs/es/es3.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,269 @@
/*
* Copyright 2009 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for ECMAScript 5.
* @see https://es5.github.io/
* @externs
*/
/**
* @param {Object|undefined} selfObj Specifies the object to which |this| should
* point when the function is run. If the value is null or undefined, it
* will default to the global object.
* @param {...*} var_args Additional arguments that are partially
* applied to fn.
* @return {!Function} A partially-applied form of the Function on which
* bind() was invoked as a method.
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
*/
Function.prototype.bind = function(selfObj, var_args) {};
/**
* @this {String|string}
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/Trim
*/
String.prototype.trim = function() {};
/**
* @this {String|string}
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimLeft
*/
String.prototype.trimLeft = function() {};
/**
* @this {String|string}
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimRight
*/
String.prototype.trimRight = function() {};
/**
* A object property descriptor used by Object.create, Object.defineProperty,
* Object.defineProperties, Object.getOwnPropertyDescriptor.
*
* Note: not a real constructor.
* @constructor
* @template THIS
*/
function ObjectPropertyDescriptor() {}
/** @type {*} */
ObjectPropertyDescriptor.prototype.value;
/** @type {(function(this: THIS):?)|undefined} */
ObjectPropertyDescriptor.prototype.get;
/** @type {(function(this: THIS, ?):void)|undefined} */
ObjectPropertyDescriptor.prototype.set;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.writable;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.enumerable;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.configurable;
/**
* @param {Object} proto
* @param {Object=} opt_properties A map of ObjectPropertyDescriptors.
* @return {!Object}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create
*/
Object.create = function(proto, opt_properties) {};
/**
* @param {!Object} obj
* @param {string} prop
* @param {!Object} descriptor A ObjectPropertyDescriptor.
* @return {!Object}
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty
*/
Object.defineProperty = function(obj, prop, descriptor) {};
/**
* @param {!Object} obj
* @param {!Object} props A map of ObjectPropertyDescriptors.
* @return {!Object}
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperties
*/
Object.defineProperties = function(obj, props) {};
/**
* @param {T} obj
* @param {string} prop
* @return {!ObjectPropertyDescriptor<T>|undefined}
* @nosideeffects
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor
*/
Object.getOwnPropertyDescriptor = function(obj, prop) {};
/**
* @param {!Object} obj
* @return {!Array<string>}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
*/
Object.keys = function(obj) {};
/**
* @param {!Object} obj
* @return {!Array<string>}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames
*/
Object.getOwnPropertyNames = function(obj) {};
/**
* @param {!Object} obj
* @return {Object}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/GetPrototypeOf
*/
Object.getPrototypeOf = function(obj) {};
/**
* @param {T} obj
* @return {T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/preventExtensions
*/
Object.preventExtensions = function(obj) {};
/**
* @param {T} obj
* @return {T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/seal
*/
Object.seal = function(obj) {};
/**
* @param {T} obj
* @return {T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze
*/
Object.freeze = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isExtensible
*/
Object.isExtensible = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isSealed
*/
Object.isSealed = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isFrozen
*/
Object.isFrozen = function(obj) {};
/**
* @param {string=} opt_key The JSON key for this object.
* @return {*} The serializable representation of this object. Note that this
* need not be a string. See http://goo.gl/PEUvs.
* @see https://es5.github.io/#x15.12.3
*/
Object.prototype.toJSON = function(opt_key) {};
/**
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toISOString
* @return {string}
*/
Date.prototype.toISOString = function() {};
/**
* @param {*=} opt_ignoredKey
* @return {string}
* @override
*/
Date.prototype.toJSON = function(opt_ignoredKey) {};
/**
* A fake type to model the JSON object.
* @constructor
*/
function JSONType() {}
/**
* @param {string} jsonStr The string to parse.
* @param {(function(string, *) : *)=} opt_reviver
* @return {*} The JSON object.
* @throws {Error}
*/
JSONType.prototype.parse = function(jsonStr, opt_reviver) {};
/**
* @param {*} jsonObj Input object.
* @param {(Array<string>|(function(string, *) : *)|null)=} opt_replacer
* @param {(number|string)=} opt_space
* @return {string} JSON string which represents jsonObj.
* @throws {Error}
*/
JSONType.prototype.stringify = function(jsonObj, opt_replacer, opt_space) {};
/**
* @type {!JSONType}
* @suppress {duplicate}
*/
var JSON;

1520
javascript/externs/es/es6.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,251 @@
/*
* Copyright 2014 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for ECMAScript 6.
* @see http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
* @externs
*/
// TODO(johnlenz): Use Tuples for the Map and Set iterators where appropriate.
/**
* @constructor @struct
* @param {Iterable<!Array<KEY|VALUE>>|!Array<!Array<KEY|VALUE>>=} opt_iterable
* @implements {Iterable<!Array<KEY|VALUE>>}
* @template KEY, VALUE
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
*/
function Map(opt_iterable) {}
/** @return {void} */
Map.prototype.clear;
/**
* @param {KEY} key
* @return {boolean}
*/
Map.prototype.delete;
/**
* @return {!IteratorIterable<!Array<KEY|VALUE>>}
* @nosideeffects
*/
Map.prototype.entries;
/**
* @param {function(this:THIS, VALUE, KEY, MAP)} callback
* @param {THIS=} opt_thisArg
* @this {MAP}
* @template MAP,THIS
*/
Map.prototype.forEach;
/**
* @param {KEY} key
* @return {VALUE}
* @nosideeffects
*/
Map.prototype.get;
/**
* @param {KEY} key
* @return {boolean}
* @nosideeffects
*/
Map.prototype.has;
/**
* @return {!IteratorIterable<KEY>}
*/
Map.prototype.keys;
/**
* @param {KEY} key
* @param {VALUE} value
* @return {THIS}
* @this {THIS}
* @template THIS
*/
Map.prototype.set;
/**
* @type {number}
* (readonly)
*/
Map.prototype.size;
/**
* @return {!IteratorIterable<VALUE>}
* @nosideeffects
*/
Map.prototype.values;
/**
* @return {!Iterator<!Array<KEY|VALUE>>}
*/
Map.prototype[Symbol.iterator] = function() {};
/**
* @constructor @struct
* @param {Iterable<!Array<KEY|VALUE>>|!Array<!Array<KEY|VALUE>>=} opt_iterable
* @template KEY, VALUE
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
*/
function WeakMap(opt_iterable) {}
/** @return {void} */
WeakMap.prototype.clear;
/**
* @param {KEY} key
* @return {boolean}
*/
WeakMap.prototype.delete;
/**
* @param {KEY} key
* @return {VALUE}
* @nosideeffects
*/
WeakMap.prototype.get;
/**
* @param {KEY} key
* @return {boolean}
* @nosideeffects
*/
WeakMap.prototype.has;
/**
* @param {KEY} key
* @param {VALUE} value
* @return {THIS}
* @this {THIS}
* @template THIS
*/
WeakMap.prototype.set;
/**
* @constructor @struct
* @param {Iterable<VALUE>|Array<VALUE>=} opt_iterable
* @implements {Iterable<VALUE>}
* @template VALUE
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
*/
function Set(opt_iterable) {}
/**
* @param {VALUE} value
* @return {THIS}
* @this {THIS}
* @template THIS
*/
Set.prototype.add;
/**
* @return {void}
*/
Set.prototype.clear;
/**
* @param {VALUE} value
* @return {boolean}
*/
Set.prototype.delete;
/**
* @return {!IteratorIterable<!Array<VALUE>>} Where each array has two entries:
* [value, value]
* @nosideeffects
*/
Set.prototype.entries;
/**
* @param {function(this: THIS, VALUE, VALUE, SET)} callback
* @param {THIS=} opt_thisArg
* @this {SET}
* @template SET,THIS
*/
Set.prototype.forEach;
/**
* @param {VALUE} value
* @return {boolean}
* @nosideeffects
*/
Set.prototype.has;
/**
* @type {number} (readonly)
*/
Set.prototype.size;
/**
* @return {!IteratorIterable<VALUE>}
* @nosideeffects
*/
Set.prototype.keys;
/**
* @return {!IteratorIterable<VALUE>}
* @nosideeffects
*/
Set.prototype.values;
/**
* @return {!Iterator<VALUE>}
*/
Set.prototype[Symbol.iterator] = function() {};
/**
* @constructor @struct
* @param {Iterable<VALUE>|Array<VALUE>=} opt_iterable
* @template VALUE
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
*/
function WeakSet(opt_iterable) {}
/**
* @param {VALUE} value
* @return {THIS}
* @this {THIS}
* @template THIS
*/
WeakSet.prototype.add;
/**
* @return {void}
*/
WeakSet.prototype.clear;
/**
* @param {VALUE} value
* @return {boolean}
*/
WeakSet.prototype.delete;
/**
* @param {VALUE} value
* @return {boolean}
* @nosideeffects
*/
WeakSet.prototype.has;

View File

@@ -0,0 +1,163 @@
/*
* Copyright 2013 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the JS Internationalization API as defined in
* http://www.ecma-international.org/ecma-402/1.0/
*
* @externs
*/
/** @const */
var Intl = {};
/**
* NOTE: this API is not from ecma402 and is subject to change.
* @param {string|Array.<string>=} opt_locales
* @param {{type: (string|undefined)}=}
* opt_options
* @constructor
*/
Intl.v8BreakIterator = function(opt_locales, opt_options) {};
/**
* @param {string} text
*/
Intl.v8BreakIterator.prototype.adoptText = function(text) {};
/**
* @return {string}
*/
Intl.v8BreakIterator.prototype.breakType = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.current = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.first = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.next = function() {};
/**
* @constructor
* @param {string|Array.<string>=} opt_locales
* @param {{usage: (string|undefined), localeMatcher: (string|undefined),
* sensitivity: (string|undefined), ignorePunctuation: (boolean|undefined),
* numeric: (boolean|undefined), caseFirst: (string|undefined)}=}
* opt_options
*/
Intl.Collator = function(opt_locales, opt_options) {};
/**
* @param {Array.<string>} locales
* @param {{localeMatcher: (string|undefined)}=} opt_options
*/
Intl.Collator.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {string} arg1
* @param {string} arg2
* @return {number}
*/
Intl.Collator.prototype.compare = function(arg1, arg2) {};
/**
* @return {{locale: string, usage: string, sensitivity: string,
* ignorePunctuation: boolean, collation: string, numeric: boolean,
* caseFirst: string}}
*/
Intl.Collator.prototype.resolvedOptions = function() {};
/**
* @constructor
* @param {string|Array.<string>=} opt_locales
* @param {{localeMatcher: (string|undefined), useGrouping: (boolean|undefined),
* numberingSystem: (string|undefined), style: (string|undefined),
* currency: (string|undefined), currencyDisplay: (string|undefined),
* minimumIntegerDigits: (number|undefined),
* minimumFractionDigits: (number|undefined),
* maximumFractionDigits: (number|undefined),
* minimumSignificantDigits: (number|undefined),
* maximumSignificantDigits: (number|undefined)}=}
* opt_options
*/
Intl.NumberFormat = function(opt_locales, opt_options) {};
/**
* @param {Array.<string>} locales
* @param {{localeMatcher: (string|undefined)}=} opt_options
*/
Intl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {number} num
* @return {string}
*/
Intl.NumberFormat.prototype.format = function(num) {};
/**
* @return {{locale: string, numberingSystem: string, style: string,
* currency: (string|undefined), currencyDisplay: (string|undefined),
* minimumIntegerDigits: number, minimumFractionDigits: number,
* maximumFractionDigits: number, minimumSignificantDigits: number,
* maximumSignificantDigits: number, useGrouping: boolean}}
*/
Intl.NumberFormat.prototype.resolvedOptions = function() {};
/**
* @constructor
* @param {string|Array.<string>=} opt_locales
* @param {{localeMatcher: (string|undefined),
* formatMatcher: (string|undefined), calendar: (string|undefined),
* numberingSystem: (string|undefined), tz: (string|undefined),
* weekday: (string|undefined), era: (string|undefined),
* year: (string|undefined), month: (string|undefined),
* day: (string|undefined), hour: (string|undefined),
* minute: (string|undefined), second: (string|undefined),
* timeZoneName: (string|undefined), hour12: (boolean|undefined)}=}
* opt_options
*/
Intl.DateTimeFormat = function(opt_locales, opt_options) {};
/**
* @param {Array.<string>} locales
* @param {{localeMatcher: string}=} opt_options
*/
Intl.DateTimeFormat.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {number} date
* @return {string}
*/
Intl.DateTimeFormat.prototype.format = function(date) {};
/**
* @return {{locale: string, calendar: string, numberingSystem: string,
* timeZone: (string|undefined), weekday: (string|undefined),
* era: (string|undefined), year: (string|undefined),
* month: (string|undefined), day: (string|undefined),
* hour: (string|undefined), minute: (string|undefined),
* second: (string|undefined), timeZoneName: (string|undefined),
* hour12: (boolean|undefined)}}
*/
Intl.DateTimeFormat.prototype.resolvedOptions = function() {};

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2017 Semmle Ltd.
*/
/**
* @fileoverview A model of the builtin Proxy object.
* @externs
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
*/
/**
* @param {*} target
* @param {Object} handler
* @constructor
*/
function Proxy(target, handler) {
}
/**
* @returns {Proxy}
*/
Proxy.prototype.revocable = function() {};

2047
javascript/externs/lib/jquery-3.2.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,112 @@
/*
* Copyright 2015 Semmle Ltd.
*/
/**
* @fileoverview A (highly incomplete) model of the should.js library.
* @externs
* @see http://shouldjs.github.io/
*/
/**
* @param {*} obj
* @returns {should.Assertion}
*/
function should(obj) {}
/**
* @constructor
*/
should.Assertion = function() {};
should.Assertion.prototype = {
assert: function() {},
fail: function() {},
get not() {},
get any() {},
get an() {},
get of() {},
get a() {},
get and() {},
get be() {},
get has() {},
get have() {},
get with() {},
get is() {},
get which() {},
get the() {},
get it() {},
true: function() {},
True: function() {},
false: function() {},
False: function() {},
ok: function() {},
NaN: function() {},
Infinity: function() {},
within: function() {},
approximately: function() {},
above: function() {},
below: function() {},
greaterThan: function() {},
lessThan: function() {},
eql: function() {},
equal: function() {},
exactly: function() {},
Number: function() {},
arguments: function() {},
Arguments: function() {},
type: function() {},
instanceof: function() {},
instanceOf: function() {},
Function: function() {},
Object: function() {},
String: function() {},
Array: function() {},
Boolean: function() {},
Error: function() {},
null: function() {},
Null: function() {},
class: function() {},
Class: function() {},
undefined: function() {},
Undefined: function() {},
iterable: function() {},
iterator: function() {},
generator: function() {},
startWith: function() {},
endWith: function() {},
propertyWithDescriptor: function() {},
enumerable: function() {},
enumerables: function() {},
property: function() {},
properties: function() {},
length: function() {},
lengthOf: function() {},
ownProperty: function() {},
hasOwnProperty: function() {},
empty: function() {},
keys: function() {},
key: function() {},
propertyByPath: function() {},
throw: function() {},
throwError: function() {},
match: function() {},
matchEach: function() {},
matchAny: function() {},
matchSome: function() {},
matchEvery: function() {},
containEql: function() {},
containDeepOrdered: function() {},
containDeep: function() {}
};
/**
* @constructor
*/
should.AssertionError = function() {};
Object.defineProperty(Object.prototype, 'should', {
get: function() { return should(this.valueOf() || this); },
enumerable: false,
configurable: true
});

View File

@@ -0,0 +1,305 @@
/*
* Copyright 2016 Semmle Ltd.
*/
/**
* @fileoverview An incomplete model of the Vows library.
* @externs
* @see vowsjs.org/#reference
*/
var assert = require('assert');
/**
* @param {number} eps
* @param {number} actual
* @param {number} expected
* @param {string=} message
* @return {void}
*/
function epsilon (eps, actual, expected, message) {}
assert.epsilon = epsilon;
/**
* @param {string} actual
* @param {RegExp} expected
* @param {string=} message
* @return {void}
*/
function match (actual, expected, message) {}
assert.match = match;
assert.matches = match;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isTrue (actual, message) {}
assert.isTrue = isTrue;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isFalse (actual, message) {}
assert.isFalse = isFalse;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isZero (actual, message) {}
assert.isZero = isZero;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isNotZero (actual, message) {}
assert.isNotZero = isNotZero;
/**
* @param {number} actual
* @param {number} expected
* @param {string=} message
* @return {void}
*/
function greater (actual, expected, message) {}
assert.greater = greater;
/**
* @param {number} actual
* @param {number} expected
* @param {string=} message
* @return {void}
*/
function lesser (actual, expected, message) {}
assert.lesser = lesser;
/**
* @param {number} actual
* @param {number} expected
* @param {number} delta
* @param {string=} message
* @return {void}
*/
function inDelta (actual, expected, delta, message) {}
assert.inDelta = inDelta;
/**
* @param {Array.<*>|Object|string} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
function include (actual, expected, message) {}
assert.include = include;
assert.includes = include;
/**
* @param {Array.<*>|Object|string} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
function notInclude (actual, expected, message) {}
assert.notInclude = notInclude;
assert.notIncludes = notInclude;
/**
* @param {Array.<*>|Object|string} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
function deepInclude (actual, expected, message) {}
assert.deepInclude = deepInclude;
assert.deepIncludes = deepInclude;
/**
* @param {Array.<*>|Object|Function|string} actual
* @param {string=} message
* @return {void}
*/
function isEmpty (actual, message) {}
assert.isEmpty = isEmpty;
/**
* @param {Array.<*>|Object|Function|string} actual
* @param {string=} message
* @return {void}
*/
function isNotEmpty (actual, message) {}
assert.isNotEmpty = isNotEmpty;
/**
* @param {Array.<*>|Object|Function|string} actual
* @param {number} expected
* @param {string=} message
* @return {void}
*/
function lengthOf (actual, expected, message) {}
assert.lengthOf = lengthOf;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isArray (actual, message) {}
assert.isArray = isArray;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isObject (actual, message) {}
assert.isObject = isObject;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isNumber (actual, message) {}
assert.isNumber = isNumber;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isBoolean (actual, message) {}
assert.isBoolean = isBoolean;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isNaN (actual, message) {}
assert.isNaN = isNaN;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isNull (actual, message) {}
assert.isNull = isNull;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isNotNull (actual, message) {}
assert.isNotNull = isNotNull;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isUndefined (actual, message) {}
assert.isUndefined = isUndefined;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isDefined (actual, message) {}
assert.isDefined = isDefined;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isString (actual, message) {}
assert.isString = isString;
/**
* @param {*} actual
* @param {string=} message
* @return {void}
*/
function isFunction (actual, message) {}
assert.isFunction = isFunction;
/**
* @param {*} actual
* @param {string} expected
* @param {string=} message
* @return {void}
*/
function typeOf (actual, expected, message) {}
assert.typeOf = typeOf;
/**
* @param {*} actual
* @param {Object} expected
* @param {string=} message
* @return {void}
*/
function instanceOf (actual, expected, message) {}
assert.instanceOf = instanceOf;
/**
* @type {Object}
*/
exports.options;
/**
* @type {Object}
*/
exports.reporter;
/**
* @type {Object}
*/
exports.console;
/**
* @param {*} val
* @return {string}
*/
exports.inspect = function (val) {};
/**
* @param {Object} obj
* @param {Array.<string>} targets
* @return {Object}
*/
exports.prepare = function (obj, targets) {};
/**
* @param {Object} batch
* @return {void}
*/
exports.tryEnd = function (batch) {};
/**
* @type {Array.<Object>}
*/
exports.suites;
/**
* @param {Object} subject
* @param {...*} args
* @return {Object}
*/
exports.describe = function (subject, args) {};
/**
* @type {string}
*/
exports.version;

View File

@@ -0,0 +1,184 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "assert"
*/
/**
* @param {*} value
* @param {string=} message
* @return {void}
*/
var internal = function(value, message) {};
var internal = internal || {};
/**
* @param {{message: string, actual: *, expected: *, operator: string, stackStartFunction: Function}=} options
* @return {internal.AssertionError}
* @constructor
*/
internal.AssertionError = function(options) {};
/**
* @type {string}
*/
internal.AssertionError.prototype.name;
/**
* @type {string}
*/
internal.AssertionError.prototype.message;
/**
* @type {*}
*/
internal.AssertionError.prototype.actual;
/**
* @type {*}
*/
internal.AssertionError.prototype.expected;
/**
* @type {string}
*/
internal.AssertionError.prototype.operator;
/**
* @type {boolean}
*/
internal.AssertionError.prototype.generatedMessage;
/**
* @param {*} actual
* @param {*} expected
* @param {string} message
* @param {string} operator
* @return {void}
*/
internal.fail = function(actual, expected, message, operator) {};
/**
* @param {*} value
* @param {string=} message
* @return {void}
*/
internal.ok = function(value, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.equal = function(actual, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.notEqual = function(actual, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.deepEqual = function(actual, expected, message) {};
/**
* @param {*} acutal
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.notDeepEqual = function(acutal, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.strictEqual = function(actual, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.notStrictEqual = function(actual, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.deepStrictEqual = function(actual, expected, message) {};
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
internal.notDeepStrictEqual = function(actual, expected, message) {};
/**
* @type {(function(Function, string=): void)|(function(Function, Function, string=): void)|(function(Function, RegExp, string=): void)|(function(Function, (function(*): boolean), string=): void)}
*/
internal.throws;
/**
* @type {(function(Function, string=): void)|(function(Function, Function, string=): void)|(function(Function, RegExp, string=): void)|(function(Function, (function(*): boolean), string=): void)}
*/
internal.doesNotThrow;
/**
* @param {*} value
* @return {void}
*/
internal.ifError = function(value) {};
module.exports = internal;

View File

@@ -0,0 +1,20 @@
/*
* Copyright 2016 Semmle Ltd.
*/
/**
* @fileoverview An extension of the node's assert module declaring legacy members
* @externs
*/
var assert = require('assert');
/**
* @param {*} actual
* @param {*} expected
* @param {string=} message
* @return {void}
*/
function eql(actual, expected, message) {}
assert.eql = eql;

View File

@@ -0,0 +1,196 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "buffer"
*/
var buffer = {};
/**
* @type {number}
*/
buffer.INSPECT_MAX_BYTES;
/**
* @param {string} str
* @param {string=} encoding
* @return {Buffer}
* @constructor
*/
var BuffType = function(str, encoding) {};
/**
* @param {number} size
* @return {Buffer}
* @constructor
*/
var BuffType = function(size) {};
/**
* @param {Uint8Array} array
* @return {Buffer}
* @constructor
*/
var BuffType = function(array) {};
/**
* @param {ArrayBuffer} arrayBuffer
* @return {Buffer}
* @constructor
*/
var BuffType = function(arrayBuffer) {};
/**
* @param {Array<*>} array
* @return {Buffer}
* @constructor
*/
var BuffType = function(array) {};
/**
* @param {Buffer} buffer
* @return {Buffer}
* @constructor
*/
var BuffType = function(buffer) {};
/**
* @type {Buffer}
*/
BuffType.prototype;
/**
* @type {(function(Array<*>): Buffer)|(function(ArrayBuffer, number=, number=): Buffer)|(function(Buffer): Buffer)|(function(string, string=): Buffer)}
*/
BuffType.from;
/**
* @type {(function(*): boolean)}
*/
BuffType.isBuffer;
/**
* @type {(function(string): boolean)}
*/
BuffType.isEncoding;
/**
* @type {(function(string, string=): number)}
*/
BuffType.byteLength;
/**
* @type {(function(Array<Buffer>, number=): Buffer)}
*/
BuffType.concat;
/**
* @type {(function(Buffer, Buffer): number)}
*/
BuffType.compare;
/**
* @type {(function(number, (string|Buffer|number)=, string=): Buffer)}
*/
BuffType.alloc;
/**
* @type {(function(number): Buffer)}
*/
BuffType.allocUnsafe;
/**
* @type {(function(number): Buffer)}
*/
BuffType.allocUnsafeSlow;
/**
* @param {string} str
* @param {string=} encoding
* @return {Buffer}
* @constructor
*/
var SlowBuffType = function(str, encoding) {};
/**
* @param {number} size
* @return {Buffer}
* @constructor
*/
var SlowBuffType = function(size) {};
/**
* @param {Uint8Array} size
* @return {Buffer}
* @constructor
*/
var SlowBuffType = function(size) {};
/**
* @param {Array<*>} array
* @return {Buffer}
* @constructor
*/
var SlowBuffType = function(array) {};
/**
* @type {Buffer}
*/
SlowBuffType.prototype;
/**
* @type {(function(*): boolean)}
*/
SlowBuffType.isBuffer;
/**
* @type {(function(string, string=): number)}
*/
SlowBuffType.byteLength;
/**
* @type {(function(Array<Buffer>, number=): Buffer)}
*/
SlowBuffType.concat;
module.exports.Buffer = BuffType;
module.exports.SlowBuffer = SlowBuffType;
module.exports.INSPECT_MAX_BYTES = buffer.INSPECT_MAX_BYTES;

View File

@@ -0,0 +1,942 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "child_process"
*/
var child_process = {};
var events = require("events");
/**
* @interface
* @extends {events.EventEmitter}
*/
child_process.ChildProcess = function() {};
/**
* @type {internal.Writable}
*/
child_process.ChildProcess.prototype.stdin;
/**
* @type {internal.Readable}
*/
child_process.ChildProcess.prototype.stdout;
/**
* @type {internal.Readable}
*/
child_process.ChildProcess.prototype.stderr;
/**
* @type {Array<*>}
*/
child_process.ChildProcess.prototype.stdio;
/**
* @type {number}
*/
child_process.ChildProcess.prototype.pid;
/**
* @param {string=} signal
* @return {void}
*/
child_process.ChildProcess.prototype.kill = function(signal) {};
/**
* @param {*} message
* @param {*=} sendHandle
* @return {boolean}
*/
child_process.ChildProcess.prototype.send = function(message, sendHandle) {};
/**
* @type {boolean}
*/
child_process.ChildProcess.prototype.connected;
/**
* @return {void}
*/
child_process.ChildProcess.prototype.disconnect = function() {};
/**
* @return {void}
*/
child_process.ChildProcess.prototype.unref = function() {};
/**
* @return {void}
*/
child_process.ChildProcess.prototype.ref = function() {};
/**
* @interface
*/
child_process.SpawnOptions = function() {};
/**
* @type {string}
*/
child_process.SpawnOptions.prototype.cwd;
/**
* @type {*}
*/
child_process.SpawnOptions.prototype.env;
/**
* @type {*}
*/
child_process.SpawnOptions.prototype.stdio;
/**
* @type {boolean}
*/
child_process.SpawnOptions.prototype.detached;
/**
* @type {number}
*/
child_process.SpawnOptions.prototype.uid;
/**
* @type {number}
*/
child_process.SpawnOptions.prototype.gid;
/**
* @type {(boolean|string)}
*/
child_process.SpawnOptions.prototype.shell;
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.SpawnOptions=} options
* @return {child_process.ChildProcess}
*/
child_process.spawn = function(command, args, options) {};
/**
* @interface
*/
child_process.ExecOptions = function() {};
/**
* @type {string}
*/
child_process.ExecOptions.prototype.cwd;
/**
* @type {*}
*/
child_process.ExecOptions.prototype.env;
/**
* @type {string}
*/
child_process.ExecOptions.prototype.shell;
/**
* @type {number}
*/
child_process.ExecOptions.prototype.timeout;
/**
* @type {number}
*/
child_process.ExecOptions.prototype.maxBuffer;
/**
* @type {string}
*/
child_process.ExecOptions.prototype.killSignal;
/**
* @type {number}
*/
child_process.ExecOptions.prototype.uid;
/**
* @type {number}
*/
child_process.ExecOptions.prototype.gid;
/**
* @interface
* @extends {child_process.ExecOptions}
*/
child_process.ExecOptionsWithStringEncoding = function() {};
/**
* @type {(string)}
*/
child_process.ExecOptionsWithStringEncoding.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecOptions}
*/
child_process.ExecOptionsWithBufferEncoding = function() {};
/**
* @type {string}
*/
child_process.ExecOptionsWithBufferEncoding.prototype.encoding;
/**
* @param {string} command
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.exec = function(command, callback) {};
/**
* @param {string} command
* @param {child_process.ExecOptionsWithStringEncoding} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.exec = function(command, options, callback) {};
/**
* @param {string} command
* @param {child_process.ExecOptionsWithBufferEncoding} options
* @param {(function(Error, Buffer, Buffer): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.exec = function(command, options, callback) {};
/**
* @param {string} command
* @param {child_process.ExecOptions} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.exec = function(command, options, callback) {};
/**
* @interface
*/
child_process.ExecFileOptions = function() {};
/**
* @type {string}
*/
child_process.ExecFileOptions.prototype.cwd;
/**
* @type {*}
*/
child_process.ExecFileOptions.prototype.env;
/**
* @type {number}
*/
child_process.ExecFileOptions.prototype.timeout;
/**
* @type {number}
*/
child_process.ExecFileOptions.prototype.maxBuffer;
/**
* @type {string}
*/
child_process.ExecFileOptions.prototype.killSignal;
/**
* @type {number}
*/
child_process.ExecFileOptions.prototype.uid;
/**
* @type {number}
*/
child_process.ExecFileOptions.prototype.gid;
/**
* @interface
* @extends {child_process.ExecFileOptions}
*/
child_process.ExecFileOptionsWithStringEncoding = function() {};
/**
* @type {(string)}
*/
child_process.ExecFileOptionsWithStringEncoding.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecFileOptions}
*/
child_process.ExecFileOptionsWithBufferEncoding = function() {};
/**
* @type {string}
*/
child_process.ExecFileOptionsWithBufferEncoding.prototype.encoding;
/**
* @param {string} file
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, callback) {};
/**
* @param {string} file
* @param {child_process.ExecFileOptionsWithStringEncoding=} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, options, callback) {};
/**
* @param {string} file
* @param {child_process.ExecFileOptionsWithBufferEncoding=} options
* @param {(function(Error, Buffer, Buffer): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, options, callback) {};
/**
* @param {string} file
* @param {child_process.ExecFileOptions=} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, options, callback) {};
/**
* @param {string} file
* @param {Array<string>=} args
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, args, callback) {};
/**
* @param {string} file
* @param {Array<string>=} args
* @param {child_process.ExecFileOptionsWithStringEncoding=} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, args, options, callback) {};
/**
* @param {string} file
* @param {Array<string>=} args
* @param {child_process.ExecFileOptionsWithBufferEncoding=} options
* @param {(function(Error, Buffer, Buffer): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, args, options, callback) {};
/**
* @param {string} file
* @param {Array<string>=} args
* @param {child_process.ExecFileOptions=} options
* @param {(function(Error, string, string): void)=} callback
* @return {child_process.ChildProcess}
*/
child_process.execFile = function(file, args, options, callback) {};
/**
* @interface
*/
child_process.ForkOptions = function() {};
/**
* @type {string}
*/
child_process.ForkOptions.prototype.cwd;
/**
* @type {*}
*/
child_process.ForkOptions.prototype.env;
/**
* @type {string}
*/
child_process.ForkOptions.prototype.execPath;
/**
* @type {Array<string>}
*/
child_process.ForkOptions.prototype.execArgv;
/**
* @type {boolean}
*/
child_process.ForkOptions.prototype.silent;
/**
* @type {number}
*/
child_process.ForkOptions.prototype.uid;
/**
* @type {number}
*/
child_process.ForkOptions.prototype.gid;
/**
* @param {string} modulePath
* @param {Array<string>=} args
* @param {child_process.ForkOptions=} options
* @return {child_process.ChildProcess}
*/
child_process.fork = function(modulePath, args, options) {};
/**
* @interface
*/
child_process.SpawnSyncOptions = function() {};
/**
* @type {string}
*/
child_process.SpawnSyncOptions.prototype.cwd;
/**
* @type {(string|Buffer)}
*/
child_process.SpawnSyncOptions.prototype.input;
/**
* @type {*}
*/
child_process.SpawnSyncOptions.prototype.stdio;
/**
* @type {*}
*/
child_process.SpawnSyncOptions.prototype.env;
/**
* @type {number}
*/
child_process.SpawnSyncOptions.prototype.uid;
/**
* @type {number}
*/
child_process.SpawnSyncOptions.prototype.gid;
/**
* @type {number}
*/
child_process.SpawnSyncOptions.prototype.timeout;
/**
* @type {string}
*/
child_process.SpawnSyncOptions.prototype.killSignal;
/**
* @type {number}
*/
child_process.SpawnSyncOptions.prototype.maxBuffer;
/**
* @type {string}
*/
child_process.SpawnSyncOptions.prototype.encoding;
/**
* @type {(boolean|string)}
*/
child_process.SpawnSyncOptions.prototype.shell;
/**
* @interface
* @extends {child_process.SpawnSyncOptions}
*/
child_process.SpawnSyncOptionsWithStringEncoding = function() {};
/**
* @type {(string)}
*/
child_process.SpawnSyncOptionsWithStringEncoding.prototype.encoding;
/**
* @interface
* @extends {child_process.SpawnSyncOptions}
*/
child_process.SpawnSyncOptionsWithBufferEncoding = function() {};
/**
* @type {string}
*/
child_process.SpawnSyncOptionsWithBufferEncoding.prototype.encoding;
/**
* @interface
* @template T
*/
child_process.SpawnSyncReturns = function() {};
/**
* @type {number}
*/
child_process.SpawnSyncReturns.prototype.pid;
/**
* @type {Array<string>}
*/
child_process.SpawnSyncReturns.prototype.output;
/**
* @type {T}
*/
child_process.SpawnSyncReturns.prototype.stdout;
/**
* @type {T}
*/
child_process.SpawnSyncReturns.prototype.stderr;
/**
* @type {number}
*/
child_process.SpawnSyncReturns.prototype.status;
/**
* @type {string}
*/
child_process.SpawnSyncReturns.prototype.signal;
/**
* @type {Error}
*/
child_process.SpawnSyncReturns.prototype.error;
/**
* @param {string} command
* @return {child_process.SpawnSyncReturns<Buffer>}
*/
child_process.spawnSync = function(command) {};
/**
* @param {string} command
* @param {child_process.SpawnSyncOptionsWithStringEncoding=} options
* @return {child_process.SpawnSyncReturns<string>}
*/
child_process.spawnSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.SpawnSyncOptionsWithBufferEncoding=} options
* @return {child_process.SpawnSyncReturns<Buffer>}
*/
child_process.spawnSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.SpawnSyncOptions=} options
* @return {child_process.SpawnSyncReturns<Buffer>}
*/
child_process.spawnSync = function(command, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.SpawnSyncOptionsWithStringEncoding=} options
* @return {child_process.SpawnSyncReturns<string>}
*/
child_process.spawnSync = function(command, args, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.SpawnSyncOptionsWithBufferEncoding=} options
* @return {child_process.SpawnSyncReturns<Buffer>}
*/
child_process.spawnSync = function(command, args, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.SpawnSyncOptions=} options
* @return {child_process.SpawnSyncReturns<Buffer>}
*/
child_process.spawnSync = function(command, args, options) {};
/**
* @interface
*/
child_process.ExecSyncOptions = function() {};
/**
* @type {string}
*/
child_process.ExecSyncOptions.prototype.cwd;
/**
* @type {(string|Buffer)}
*/
child_process.ExecSyncOptions.prototype.input;
/**
* @type {*}
*/
child_process.ExecSyncOptions.prototype.stdio;
/**
* @type {*}
*/
child_process.ExecSyncOptions.prototype.env;
/**
* @type {string}
*/
child_process.ExecSyncOptions.prototype.shell;
/**
* @type {number}
*/
child_process.ExecSyncOptions.prototype.uid;
/**
* @type {number}
*/
child_process.ExecSyncOptions.prototype.gid;
/**
* @type {number}
*/
child_process.ExecSyncOptions.prototype.timeout;
/**
* @type {string}
*/
child_process.ExecSyncOptions.prototype.killSignal;
/**
* @type {number}
*/
child_process.ExecSyncOptions.prototype.maxBuffer;
/**
* @type {string}
*/
child_process.ExecSyncOptions.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecSyncOptions}
*/
child_process.ExecSyncOptionsWithStringEncoding = function() {};
/**
* @type {(string)}
*/
child_process.ExecSyncOptionsWithStringEncoding.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecSyncOptions}
*/
child_process.ExecSyncOptionsWithBufferEncoding = function() {};
/**
* @type {string}
*/
child_process.ExecSyncOptionsWithBufferEncoding.prototype.encoding;
/**
* @param {string} command
* @return {Buffer}
*/
child_process.execSync = function(command) {};
/**
* @param {string} command
* @param {child_process.ExecSyncOptionsWithStringEncoding=} options
* @return {string}
*/
child_process.execSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.ExecSyncOptionsWithBufferEncoding=} options
* @return {Buffer}
*/
child_process.execSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.ExecSyncOptions=} options
* @return {Buffer}
*/
child_process.execSync = function(command, options) {};
/**
* @interface
*/
child_process.ExecFileSyncOptions = function() {};
/**
* @type {string}
*/
child_process.ExecFileSyncOptions.prototype.cwd;
/**
* @type {(string|Buffer)}
*/
child_process.ExecFileSyncOptions.prototype.input;
/**
* @type {*}
*/
child_process.ExecFileSyncOptions.prototype.stdio;
/**
* @type {*}
*/
child_process.ExecFileSyncOptions.prototype.env;
/**
* @type {number}
*/
child_process.ExecFileSyncOptions.prototype.uid;
/**
* @type {number}
*/
child_process.ExecFileSyncOptions.prototype.gid;
/**
* @type {number}
*/
child_process.ExecFileSyncOptions.prototype.timeout;
/**
* @type {string}
*/
child_process.ExecFileSyncOptions.prototype.killSignal;
/**
* @type {number}
*/
child_process.ExecFileSyncOptions.prototype.maxBuffer;
/**
* @type {string}
*/
child_process.ExecFileSyncOptions.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecFileSyncOptions}
*/
child_process.ExecFileSyncOptionsWithStringEncoding = function() {};
/**
* @type {(string)}
*/
child_process.ExecFileSyncOptionsWithStringEncoding.prototype.encoding;
/**
* @interface
* @extends {child_process.ExecFileSyncOptions}
*/
child_process.ExecFileSyncOptionsWithBufferEncoding = function() {};
/**
* @type {string}
*/
child_process.ExecFileSyncOptionsWithBufferEncoding.prototype.encoding;
/**
* @param {string} command
* @return {Buffer}
*/
child_process.execFileSync = function(command) {};
/**
* @param {string} command
* @param {child_process.ExecFileSyncOptionsWithStringEncoding=} options
* @return {string}
*/
child_process.execFileSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.ExecFileSyncOptionsWithBufferEncoding=} options
* @return {Buffer}
*/
child_process.execFileSync = function(command, options) {};
/**
* @param {string} command
* @param {child_process.ExecFileSyncOptions=} options
* @return {Buffer}
*/
child_process.execFileSync = function(command, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.ExecFileSyncOptionsWithStringEncoding=} options
* @return {string}
*/
child_process.execFileSync = function(command, args, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.ExecFileSyncOptionsWithBufferEncoding=} options
* @return {Buffer}
*/
child_process.execFileSync = function(command, args, options) {};
/**
* @param {string} command
* @param {Array<string>=} args
* @param {child_process.ExecFileSyncOptions=} options
* @return {Buffer}
*/
child_process.execFileSync = function(command, args, options) {};
module.exports.ChildProcess = child_process.ChildProcess;
module.exports.SpawnOptions = child_process.SpawnOptions;
module.exports.spawn = child_process.spawn;
module.exports.ExecOptions = child_process.ExecOptions;
module.exports.ExecOptionsWithStringEncoding = child_process.ExecOptionsWithStringEncoding;
module.exports.ExecOptionsWithBufferEncoding = child_process.ExecOptionsWithBufferEncoding;
module.exports.exec = child_process.exec;
module.exports.exec = child_process.exec;
module.exports.exec = child_process.exec;
module.exports.exec = child_process.exec;
module.exports.ExecFileOptions = child_process.ExecFileOptions;
module.exports.ExecFileOptionsWithStringEncoding = child_process.ExecFileOptionsWithStringEncoding;
module.exports.ExecFileOptionsWithBufferEncoding = child_process.ExecFileOptionsWithBufferEncoding;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.execFile = child_process.execFile;
module.exports.ForkOptions = child_process.ForkOptions;
module.exports.fork = child_process.fork;
module.exports.SpawnSyncOptions = child_process.SpawnSyncOptions;
module.exports.SpawnSyncOptionsWithStringEncoding = child_process.SpawnSyncOptionsWithStringEncoding;
module.exports.SpawnSyncOptionsWithBufferEncoding = child_process.SpawnSyncOptionsWithBufferEncoding;
module.exports.SpawnSyncReturns = child_process.SpawnSyncReturns;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.spawnSync = child_process.spawnSync;
module.exports.ExecSyncOptions = child_process.ExecSyncOptions;
module.exports.ExecSyncOptionsWithStringEncoding = child_process.ExecSyncOptionsWithStringEncoding;
module.exports.ExecSyncOptionsWithBufferEncoding = child_process.ExecSyncOptionsWithBufferEncoding;
module.exports.execSync = child_process.execSync;
module.exports.execSync = child_process.execSync;
module.exports.execSync = child_process.execSync;
module.exports.execSync = child_process.execSync;
module.exports.ExecFileSyncOptions = child_process.ExecFileSyncOptions;
module.exports.ExecFileSyncOptionsWithStringEncoding = child_process.ExecFileSyncOptionsWithStringEncoding;
module.exports.ExecFileSyncOptionsWithBufferEncoding = child_process.ExecFileSyncOptionsWithBufferEncoding;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;
module.exports.execFileSync = child_process.execFileSync;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "console"
*/
module.exports = console;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,972 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "crypto"
*/
var crypto = {};
/**
* @interface
*/
crypto.Certificate = function() {};
/**
* @param {(string|Buffer)} spkac
* @return {Buffer}
*/
crypto.Certificate.prototype.exportChallenge = function(spkac) {};
/**
* @param {(string|Buffer)} spkac
* @return {Buffer}
*/
crypto.Certificate.prototype.exportPublicKey = function(spkac) {};
/**
* @param {Buffer} spkac
* @return {boolean}
*/
crypto.Certificate.prototype.verifySpkac = function(spkac) {};
/**
* @return {crypto.Certificate}
*/
crypto.Certificate = function() {};
/**
* @return {crypto.Certificate}
* @constructor
*/
crypto.Certificate = function() {};
/**
* @type {boolean}
*/
crypto.fips;
/**
* @interface
*/
crypto.CredentialDetails = function() {};
/**
* @type {string}
*/
crypto.CredentialDetails.prototype.pfx;
/**
* @type {string}
*/
crypto.CredentialDetails.prototype.key;
/**
* @type {string}
*/
crypto.CredentialDetails.prototype.passphrase;
/**
* @type {string}
*/
crypto.CredentialDetails.prototype.cert;
/**
* @type {(string|Array<string>)}
*/
crypto.CredentialDetails.prototype.ca;
/**
* @type {(string|Array<string>)}
*/
crypto.CredentialDetails.prototype.crl;
/**
* @type {string}
*/
crypto.CredentialDetails.prototype.ciphers;
/**
* @interface
*/
crypto.Credentials = function() {};
/**
* @type {*}
*/
crypto.Credentials.prototype.context;
/**
* @param {crypto.CredentialDetails} details
* @return {crypto.Credentials}
*/
crypto.createCredentials = function(details) {};
/**
* @param {string} algorithm
* @return {crypto.Hash}
*/
crypto.createHash = function(algorithm) {};
/**
* @param {string} algorithm
* @param {(string|Buffer)} key
* @return {crypto.Hmac}
*/
crypto.createHmac = function(algorithm, key) {};
/**
* @interface
* @extends {NodeJS.ReadWriteStream}
*/
crypto.Hash = function() {};
/**
* @param {(string|Buffer)} data
* @return {crypto.Hash}
*/
crypto.Hash.prototype.update = function(data) {};
/**
* @param {(string|Buffer)} data
* @param {(string)} input_encoding
* @return {crypto.Hash}
*/
crypto.Hash.prototype.update = function(data, input_encoding) {};
/**
* @return {Buffer}
*/
crypto.Hash.prototype.digest = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.Hash.prototype.digest = function(encoding) {};
/**
* @interface
* @extends {NodeJS.ReadWriteStream}
*/
crypto.Hmac = function() {};
/**
* @param {(string|Buffer)} data
* @return {crypto.Hmac}
*/
crypto.Hmac.prototype.update = function(data) {};
/**
* @param {(string|Buffer)} data
* @param {(string)} input_encoding
* @return {crypto.Hmac}
*/
crypto.Hmac.prototype.update = function(data, input_encoding) {};
/**
* @return {Buffer}
*/
crypto.Hmac.prototype.digest = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.Hmac.prototype.digest = function(encoding) {};
/**
* @param {string} algorithm
* @param {*} password
* @return {crypto.Cipher}
*/
crypto.createCipher = function(algorithm, password) {};
/**
* @param {string} algorithm
* @param {*} key
* @param {*} iv
* @return {crypto.Cipher}
*/
crypto.createCipheriv = function(algorithm, key, iv) {};
/**
* @interface
* @extends {NodeJS.ReadWriteStream}
*/
crypto.Cipher = function() {};
/**
* @param {Buffer} data
* @return {Buffer}
*/
crypto.Cipher.prototype.update = function(data) {};
/**
* @param {string} data
* @param {(string)} input_encoding
* @return {Buffer}
*/
crypto.Cipher.prototype.update = function(data, input_encoding) {};
/**
* @param {Buffer} data
* @param {*} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.Cipher.prototype.update = function(data, input_encoding, output_encoding) {};
/**
* @param {string} data
* @param {(string)} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.Cipher.prototype.update = function(data, input_encoding, output_encoding) {};
/**
* @return {Buffer}
*/
crypto.Cipher.prototype.final = function() {};
/**
* @param {string} output_encoding
* @return {string}
*/
crypto.Cipher.prototype.final = function(output_encoding) {};
/**
* @param {boolean=} auto_padding
* @return {void}
*/
crypto.Cipher.prototype.setAutoPadding = function(auto_padding) {};
/**
* @return {Buffer}
*/
crypto.Cipher.prototype.getAuthTag = function() {};
/**
* @param {Buffer} buffer
* @return {void}
*/
crypto.Cipher.prototype.setAAD = function(buffer) {};
/**
* @param {string} algorithm
* @param {*} password
* @return {crypto.Decipher}
*/
crypto.createDecipher = function(algorithm, password) {};
/**
* @param {string} algorithm
* @param {*} key
* @param {*} iv
* @return {crypto.Decipher}
*/
crypto.createDecipheriv = function(algorithm, key, iv) {};
/**
* @interface
* @extends {NodeJS.ReadWriteStream}
*/
crypto.Decipher = function() {};
/**
* @param {Buffer} data
* @return {Buffer}
*/
crypto.Decipher.prototype.update = function(data) {};
/**
* @param {string} data
* @param {(string)} input_encoding
* @return {Buffer}
*/
crypto.Decipher.prototype.update = function(data, input_encoding) {};
/**
* @param {Buffer} data
* @param {*} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.Decipher.prototype.update = function(data, input_encoding, output_encoding) {};
/**
* @param {string} data
* @param {(string)} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.Decipher.prototype.update = function(data, input_encoding, output_encoding) {};
/**
* @return {Buffer}
*/
crypto.Decipher.prototype.final = function() {};
/**
* @param {string} output_encoding
* @return {string}
*/
crypto.Decipher.prototype.final = function(output_encoding) {};
/**
* @param {boolean=} auto_padding
* @return {void}
*/
crypto.Decipher.prototype.setAutoPadding = function(auto_padding) {};
/**
* @param {Buffer} tag
* @return {void}
*/
crypto.Decipher.prototype.setAuthTag = function(tag) {};
/**
* @param {Buffer} buffer
* @return {void}
*/
crypto.Decipher.prototype.setAAD = function(buffer) {};
/**
* @param {string} algorithm
* @return {crypto.Signer}
*/
crypto.createSign = function(algorithm) {};
/**
* @interface
* @extends {NodeJS.WritableStream}
*/
crypto.Signer = function() {};
/**
* @param {(string|Buffer)} data
* @return {crypto.Signer}
*/
crypto.Signer.prototype.update = function(data) {};
/**
* @param {(string|Buffer)} data
* @param {(string)} input_encoding
* @return {crypto.Signer}
*/
crypto.Signer.prototype.update = function(data, input_encoding) {};
/**
* @param {(string|{key: string, passphrase: string})} private_key
* @return {Buffer}
*/
crypto.Signer.prototype.sign = function(private_key) {};
/**
* @param {(string|{key: string, passphrase: string})} private_key
* @param {(string)} output_format
* @return {string}
*/
crypto.Signer.prototype.sign = function(private_key, output_format) {};
/**
* @param {string} algorith
* @return {crypto.Verify}
*/
crypto.createVerify = function(algorith) {};
/**
* @interface
* @extends {NodeJS.WritableStream}
*/
crypto.Verify = function() {};
/**
* @param {(string|Buffer)} data
* @return {crypto.Verify}
*/
crypto.Verify.prototype.update = function(data) {};
/**
* @param {(string|Buffer)} data
* @param {(string)} input_encoding
* @return {crypto.Verify}
*/
crypto.Verify.prototype.update = function(data, input_encoding) {};
/**
* @param {string} object
* @param {Buffer} signature
* @return {boolean}
*/
crypto.Verify.prototype.verify = function(object, signature) {};
/**
* @param {string} object
* @param {string} signature
* @param {(string)} signature_format
* @return {boolean}
*/
crypto.Verify.prototype.verify = function(object, signature, signature_format) {};
/**
* @param {number} prime_length
* @param {number=} generator
* @return {crypto.DiffieHellman}
*/
crypto.createDiffieHellman = function(prime_length, generator) {};
/**
* @param {Buffer} prime
* @return {crypto.DiffieHellman}
*/
crypto.createDiffieHellman = function(prime) {};
/**
* @param {string} prime
* @param {(string)} prime_encoding
* @return {crypto.DiffieHellman}
*/
crypto.createDiffieHellman = function(prime, prime_encoding) {};
/**
* @param {string} prime
* @param {(string)} prime_encoding
* @param {(number|Buffer)} generator
* @return {crypto.DiffieHellman}
*/
crypto.createDiffieHellman = function(prime, prime_encoding, generator) {};
/**
* @param {string} prime
* @param {(string)} prime_encoding
* @param {string} generator
* @param {(string)} generator_encoding
* @return {crypto.DiffieHellman}
*/
crypto.createDiffieHellman = function(prime, prime_encoding, generator, generator_encoding) {};
/**
* @interface
*/
crypto.DiffieHellman = function() {};
/**
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.generateKeys = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.generateKeys = function(encoding) {};
/**
* @param {Buffer} other_public_key
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.computeSecret = function(other_public_key) {};
/**
* @param {string} other_public_key
* @param {(string)} input_encoding
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.computeSecret = function(other_public_key, input_encoding) {};
/**
* @param {string} other_public_key
* @param {(string)} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.computeSecret = function(other_public_key, input_encoding, output_encoding) {};
/**
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.getPrime = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.getPrime = function(encoding) {};
/**
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.getGenerator = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.getGenerator = function(encoding) {};
/**
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.getPublicKey = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.getPublicKey = function(encoding) {};
/**
* @return {Buffer}
*/
crypto.DiffieHellman.prototype.getPrivateKey = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.DiffieHellman.prototype.getPrivateKey = function(encoding) {};
/**
* @param {Buffer} public_key
* @return {void}
*/
crypto.DiffieHellman.prototype.setPublicKey = function(public_key) {};
/**
* @param {string} public_key
* @param {string} encoding
* @return {void}
*/
crypto.DiffieHellman.prototype.setPublicKey = function(public_key, encoding) {};
/**
* @param {Buffer} private_key
* @return {void}
*/
crypto.DiffieHellman.prototype.setPrivateKey = function(private_key) {};
/**
* @param {string} private_key
* @param {string} encoding
* @return {void}
*/
crypto.DiffieHellman.prototype.setPrivateKey = function(private_key, encoding) {};
/**
* @type {number}
*/
crypto.DiffieHellman.prototype.verifyError;
/**
* @param {string} group_name
* @return {crypto.DiffieHellman}
*/
crypto.getDiffieHellman = function(group_name) {};
/**
* @param {(string|Buffer)} password
* @param {(string|Buffer)} salt
* @param {number} iterations
* @param {number} keylen
* @param {string} digest
* @param {(function(Error, Buffer): *)} callback
* @return {void}
*/
crypto.pbkdf2 = function(password, salt, iterations, keylen, digest, callback) {};
/**
* @param {(string|Buffer)} password
* @param {(string|Buffer)} salt
* @param {number} iterations
* @param {number} keylen
* @param {string} digest
* @return {Buffer}
*/
crypto.pbkdf2Sync = function(password, salt, iterations, keylen, digest) {};
/**
* @param {number} size
* @return {Buffer}
*/
crypto.randomBytes = function(size) {};
/**
* @param {number} size
* @param {(function(Error, Buffer): void)} callback
* @return {void}
*/
crypto.randomBytes = function(size, callback) {};
/**
* @param {number} size
* @return {Buffer}
*/
crypto.pseudoRandomBytes = function(size) {};
/**
* @param {number} size
* @param {(function(Error, Buffer): void)} callback
* @return {void}
*/
crypto.pseudoRandomBytes = function(size, callback) {};
/**
* @interface
*/
crypto.RsaPublicKey = function() {};
/**
* @type {string}
*/
crypto.RsaPublicKey.prototype.key;
/**
* @type {number}
*/
crypto.RsaPublicKey.prototype.padding;
/**
* @interface
*/
crypto.RsaPrivateKey = function() {};
/**
* @type {string}
*/
crypto.RsaPrivateKey.prototype.key;
/**
* @type {string}
*/
crypto.RsaPrivateKey.prototype.passphrase;
/**
* @type {number}
*/
crypto.RsaPrivateKey.prototype.padding;
/**
* @param {(string|crypto.RsaPublicKey)} public_key
* @param {Buffer} buffer
* @return {Buffer}
*/
crypto.publicEncrypt = function(public_key, buffer) {};
/**
* @param {(string|crypto.RsaPrivateKey)} private_key
* @param {Buffer} buffer
* @return {Buffer}
*/
crypto.privateDecrypt = function(private_key, buffer) {};
/**
* @param {(string|crypto.RsaPrivateKey)} private_key
* @param {Buffer} buffer
* @return {Buffer}
*/
crypto.privateEncrypt = function(private_key, buffer) {};
/**
* @param {(string|crypto.RsaPublicKey)} public_key
* @param {Buffer} buffer
* @return {Buffer}
*/
crypto.publicDecrypt = function(public_key, buffer) {};
/**
* @return {Array<string>}
*/
crypto.getCiphers = function() {};
/**
* @return {Array<string>}
*/
crypto.getCurves = function() {};
/**
* @return {Array<string>}
*/
crypto.getHashes = function() {};
/**
* @interface
*/
crypto.ECDH = function() {};
/**
* @return {Buffer}
*/
crypto.ECDH.prototype.generateKeys = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.ECDH.prototype.generateKeys = function(encoding) {};
/**
* @param {(string)} encoding
* @param {(string)} format
* @return {string}
*/
crypto.ECDH.prototype.generateKeys = function(encoding, format) {};
/**
* @param {Buffer} other_public_key
* @return {Buffer}
*/
crypto.ECDH.prototype.computeSecret = function(other_public_key) {};
/**
* @param {string} other_public_key
* @param {(string)} input_encoding
* @return {Buffer}
*/
crypto.ECDH.prototype.computeSecret = function(other_public_key, input_encoding) {};
/**
* @param {string} other_public_key
* @param {(string)} input_encoding
* @param {(string)} output_encoding
* @return {string}
*/
crypto.ECDH.prototype.computeSecret = function(other_public_key, input_encoding, output_encoding) {};
/**
* @return {Buffer}
*/
crypto.ECDH.prototype.getPrivateKey = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.ECDH.prototype.getPrivateKey = function(encoding) {};
/**
* @return {Buffer}
*/
crypto.ECDH.prototype.getPublicKey = function() {};
/**
* @param {(string)} encoding
* @return {string}
*/
crypto.ECDH.prototype.getPublicKey = function(encoding) {};
/**
* @param {(string)} encoding
* @param {(string)} format
* @return {string}
*/
crypto.ECDH.prototype.getPublicKey = function(encoding, format) {};
/**
* @param {Buffer} private_key
* @return {void}
*/
crypto.ECDH.prototype.setPrivateKey = function(private_key) {};
/**
* @param {string} private_key
* @param {(string)} encoding
* @return {void}
*/
crypto.ECDH.prototype.setPrivateKey = function(private_key, encoding) {};
/**
* @param {string} curve_name
* @return {crypto.ECDH}
*/
crypto.createECDH = function(curve_name) {};
/**
* @type {string}
*/
crypto.DEFAULT_ENCODING;
module.exports.Certificate = crypto.Certificate;
module.exports.Certificate = crypto.Certificate;
module.exports.fips = crypto.fips;
module.exports.CredentialDetails = crypto.CredentialDetails;
module.exports.Credentials = crypto.Credentials;
module.exports.createCredentials = crypto.createCredentials;
module.exports.createHash = crypto.createHash;
module.exports.createHmac = crypto.createHmac;
module.exports.Hash = crypto.Hash;
module.exports.Hmac = crypto.Hmac;
module.exports.createCipher = crypto.createCipher;
module.exports.createCipheriv = crypto.createCipheriv;
module.exports.Cipher = crypto.Cipher;
module.exports.createDecipher = crypto.createDecipher;
module.exports.createDecipheriv = crypto.createDecipheriv;
module.exports.Decipher = crypto.Decipher;
module.exports.createSign = crypto.createSign;
module.exports.Signer = crypto.Signer;
module.exports.createVerify = crypto.createVerify;
module.exports.Verify = crypto.Verify;
module.exports.createDiffieHellman = crypto.createDiffieHellman;
module.exports.createDiffieHellman = crypto.createDiffieHellman;
module.exports.createDiffieHellman = crypto.createDiffieHellman;
module.exports.createDiffieHellman = crypto.createDiffieHellman;
module.exports.createDiffieHellman = crypto.createDiffieHellman;
module.exports.DiffieHellman = crypto.DiffieHellman;
module.exports.getDiffieHellman = crypto.getDiffieHellman;
module.exports.pbkdf2 = crypto.pbkdf2;
module.exports.pbkdf2Sync = crypto.pbkdf2Sync;
module.exports.randomBytes = crypto.randomBytes;
module.exports.randomBytes = crypto.randomBytes;
module.exports.pseudoRandomBytes = crypto.pseudoRandomBytes;
module.exports.pseudoRandomBytes = crypto.pseudoRandomBytes;
module.exports.RsaPublicKey = crypto.RsaPublicKey;
module.exports.RsaPrivateKey = crypto.RsaPrivateKey;
module.exports.publicEncrypt = crypto.publicEncrypt;
module.exports.privateDecrypt = crypto.privateDecrypt;
module.exports.privateEncrypt = crypto.privateEncrypt;
module.exports.publicDecrypt = crypto.publicDecrypt;
module.exports.getCiphers = crypto.getCiphers;
module.exports.getCurves = crypto.getCurves;
module.exports.getHashes = crypto.getHashes;
module.exports.ECDH = crypto.ECDH;
module.exports.createECDH = crypto.createECDH;
module.exports.DEFAULT_ENCODING = crypto.DEFAULT_ENCODING;
/**
* @interface
* @extends {crypto.Signer}
*/
crypto.Sign = function() {};
/**
* @param {number} size
* @param {(function(Error, Buffer): *)=} callback
* @return {void}
*/
crypto.rng = function(size, callback) {};
/**
* @param {number} size
* @param {(function(Error, Buffer): *)=} callback
* @return {void}
*/
crypto.prng = function(size, callback) {};
/**
* @interface
* @extends {NodeJS.ReadWriteStream}
*/
crypto.Decipher = function() {};
/**
* @param {string} output_encoding
* @return {(string|Buffer)}
*/
crypto.Decipher.prototype.finaltol = function(output_encoding) {};
/**
* @interface
*/
crypto.ECDH = function() {};
/**
* @param {Buffer} private_key
* @return {void}
*/
crypto.ECDH.prototype.setPublicKey = function(private_key) {};
/**
* @param {string} private_key
* @param {string} encoding
* @return {void}
*/
crypto.ECDH.prototype.setPublicKey = function(private_key, encoding) {};
module.exports.Sign = crypto.Sign;
module.exports.rng = crypto.rng;
module.exports.prng = crypto.prng;
module.exports.Decipher = crypto.Decipher;
module.exports.ECDH = crypto.ECDH;

View File

@@ -0,0 +1,238 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "dgram"
*/
var dgram = {};
var events = require("events");
/**
* @interface
*/
function RemoteInfo() {}
/**
* @type {string}
*/
RemoteInfo.prototype.address;
/**
* @type {number}
*/
RemoteInfo.prototype.port;
/**
* @type {number}
*/
RemoteInfo.prototype.size;
/**
* @interface
*/
function AddressInfo() {}
/**
* @type {string}
*/
AddressInfo.prototype.address;
/**
* @type {string}
*/
AddressInfo.prototype.family;
/**
* @type {number}
*/
AddressInfo.prototype.port;
/**
* @interface
*/
function BindOptions() {}
/**
* @type {number}
*/
BindOptions.prototype.port;
/**
* @type {string}
*/
BindOptions.prototype.address;
/**
* @type {boolean}
*/
BindOptions.prototype.exclusive;
/**
* @interface
*/
function SocketOptions() {}
/**
* @type {(string)}
*/
SocketOptions.prototype.type;
/**
* @type {boolean}
*/
SocketOptions.prototype.reuseAddr;
/**
* @param {string} type
* @param {(function(Buffer, dgram.RemoteInfo): void)=} callback
* @return {dgram.Socket}
*/
dgram.createSocket = function(type, callback) {};
/**
* @param {dgram.SocketOptions} options
* @param {(function(Buffer, dgram.RemoteInfo): void)=} callback
* @return {dgram.Socket}
*/
dgram.createSocket = function(options, callback) {};
/**
* @interface
* @extends {events.EventEmitter}
*/
dgram.Socket = function() {};
/**
* @param {(Buffer|String|Array<*>)} msg
* @param {number} port
* @param {string} address
* @param {(function(Error, number): void)=} callback
* @return {void}
*/
dgram.Socket.prototype.send = function(msg, port, address, callback) {};
/**
* @param {(Buffer|String|Array<*>)} msg
* @param {number} offset
* @param {number} length
* @param {number} port
* @param {string} address
* @param {(function(Error, number): void)=} callback
* @return {void}
*/
dgram.Socket.prototype.send = function(msg, offset, length, port, address, callback) {};
/**
* @param {number=} port
* @param {string=} address
* @param {(function(): void)=} callback
* @return {void}
*/
dgram.Socket.prototype.bind = function(port, address, callback) {};
/**
* @param {dgram.BindOptions} options
* @param {Function=} callback
* @return {void}
*/
dgram.Socket.prototype.bind = function(options, callback) {};
/**
* @param {*=} callback
* @return {void}
*/
dgram.Socket.prototype.close = function(callback) {};
/**
* @return {dgram.AddressInfo}
*/
dgram.Socket.prototype.address = function() {};
/**
* @param {boolean} flag
* @return {void}
*/
dgram.Socket.prototype.setBroadcast = function(flag) {};
/**
* @param {number} ttl
* @return {void}
*/
dgram.Socket.prototype.setTTL = function(ttl) {};
/**
* @param {number} ttl
* @return {void}
*/
dgram.Socket.prototype.setMulticastTTL = function(ttl) {};
/**
* @param {boolean} flag
* @return {void}
*/
dgram.Socket.prototype.setMulticastLoopback = function(flag) {};
/**
* @param {string} multicastAddress
* @param {string=} multicastInterface
* @return {void}
*/
dgram.Socket.prototype.addMembership = function(multicastAddress, multicastInterface) {};
/**
* @param {string} multicastAddress
* @param {string=} multicastInterface
* @return {void}
*/
dgram.Socket.prototype.dropMembership = function(multicastAddress, multicastInterface) {};
/**
* @return {void}
*/
dgram.Socket.prototype.ref = function() {};
/**
* @return {void}
*/
dgram.Socket.prototype.unref = function() {};
module.exports.createSocket = dgram.createSocket;
module.exports.createSocket = dgram.createSocket;
module.exports.Socket = dgram.Socket;

View File

@@ -0,0 +1,344 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "dns"
*/
var dns = {};
/**
* @interface
*/
dns.MxRecord = function() {};
/**
* @type {string}
*/
dns.MxRecord.prototype.exchange;
/**
* @type {number}
*/
dns.MxRecord.prototype.priority;
/**
* @param {string} domain
* @param {number} family
* @param {(function(Error, string, number): void)} callback
* @return {string}
*/
dns.lookup = function(domain, family, callback) {};
/**
* @param {string} domain
* @param {(function(Error, string, number): void)} callback
* @return {string}
*/
dns.lookup = function(domain, callback) {};
/**
* @param {string} domain
* @param {string} rrtype
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolve = function(domain, rrtype, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolve = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolve4 = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolve6 = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<dns.MxRecord>): void)} callback
* @return {Array<string>}
*/
dns.resolveMx = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolveTxt = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolveSrv = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolveNs = function(domain, callback) {};
/**
* @param {string} domain
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.resolveCname = function(domain, callback) {};
/**
* @param {string} ip
* @param {(function(Error, Array<string>): void)} callback
* @return {Array<string>}
*/
dns.reverse = function(ip, callback) {};
/**
* @param {Array<string>} servers
* @return {void}
*/
dns.setServers = function(servers) {};
/**
* @type {string}
*/
dns.NODATA;
/**
* @type {string}
*/
dns.FORMERR;
/**
* @type {string}
*/
dns.SERVFAIL;
/**
* @type {string}
*/
dns.NOTFOUND;
/**
* @type {string}
*/
dns.NOTIMP;
/**
* @type {string}
*/
dns.REFUSED;
/**
* @type {string}
*/
dns.BADQUERY;
/**
* @type {string}
*/
dns.BADNAME;
/**
* @type {string}
*/
dns.BADFAMILY;
/**
* @type {string}
*/
dns.BADRESP;
/**
* @type {string}
*/
dns.CONNREFUSED;
/**
* @type {string}
*/
dns.TIMEOUT;
/**
* @type {string}
*/
dns.EOF;
/**
* @type {string}
*/
dns.FILE;
/**
* @type {string}
*/
dns.NOMEM;
/**
* @type {string}
*/
dns.DESTRUCTION;
/**
* @type {string}
*/
dns.BADSTR;
/**
* @type {string}
*/
dns.BADFLAGS;
/**
* @type {string}
*/
dns.NONAME;
/**
* @type {string}
*/
dns.BADHINTS;
/**
* @type {string}
*/
dns.NOTINITIALIZED;
/**
* @type {string}
*/
dns.LOADIPHLPAPI;
/**
* @type {string}
*/
dns.ADDRGETNETWORKPARAMS;
/**
* @type {string}
*/
dns.CANCELLED;
module.exports.MxRecord = dns.MxRecord;
module.exports.lookup = dns.lookup;
module.exports.lookup = dns.lookup;
module.exports.resolve = dns.resolve;
module.exports.resolve = dns.resolve;
module.exports.resolve4 = dns.resolve4;
module.exports.resolve6 = dns.resolve6;
module.exports.resolveMx = dns.resolveMx;
module.exports.resolveTxt = dns.resolveTxt;
module.exports.resolveSrv = dns.resolveSrv;
module.exports.resolveNs = dns.resolveNs;
module.exports.resolveCname = dns.resolveCname;
module.exports.reverse = dns.reverse;
module.exports.setServers = dns.setServers;
module.exports.NODATA = dns.NODATA;
module.exports.FORMERR = dns.FORMERR;
module.exports.SERVFAIL = dns.SERVFAIL;
module.exports.NOTFOUND = dns.NOTFOUND;
module.exports.NOTIMP = dns.NOTIMP;
module.exports.REFUSED = dns.REFUSED;
module.exports.BADQUERY = dns.BADQUERY;
module.exports.BADNAME = dns.BADNAME;
module.exports.BADFAMILY = dns.BADFAMILY;
module.exports.BADRESP = dns.BADRESP;
module.exports.CONNREFUSED = dns.CONNREFUSED;
module.exports.TIMEOUT = dns.TIMEOUT;
module.exports.EOF = dns.EOF;
module.exports.FILE = dns.FILE;
module.exports.NOMEM = dns.NOMEM;
module.exports.DESTRUCTION = dns.DESTRUCTION;
module.exports.BADSTR = dns.BADSTR;
module.exports.BADFLAGS = dns.BADFLAGS;
module.exports.NONAME = dns.NONAME;
module.exports.BADHINTS = dns.BADHINTS;
module.exports.NOTINITIALIZED = dns.NOTINITIALIZED;
module.exports.LOADIPHLPAPI = dns.LOADIPHLPAPI;
module.exports.ADDRGETNETWORKPARAMS = dns.ADDRGETNETWORKPARAMS;
module.exports.CANCELLED = dns.CANCELLED;

View File

@@ -0,0 +1,116 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "domain"
*/
var domain = {};
var events = require("events");
/**
* @constructor
* @extends {events.EventEmitter}
* @implements {NodeJS.Domain}
*/
domain.Domain;
/**
* @param {Function} fn
* @return {void}
*/
domain.Domain.prototype.run = function(fn) {};
/**
* @param {events.EventEmitter} emitter
* @return {void}
*/
domain.Domain.prototype.add = function(emitter) {};
/**
* @param {events.EventEmitter} emitter
* @return {void}
*/
domain.Domain.prototype.remove = function(emitter) {};
/**
* @param {(function(Error, *): *)} cb
* @return {*}
*/
domain.Domain.prototype.bind = function(cb) {};
/**
* @param {(function(*): *)} cb
* @return {*}
*/
domain.Domain.prototype.intercept = function(cb) {};
/**
* @return {void}
*/
domain.Domain.prototype.dispose = function() {};
/**
* @type {Array<*>}
*/
domain.Domain.prototype.members;
/**
* @return {void}
*/
domain.Domain.prototype.enter = function() {};
/**
* @return {void}
*/
domain.Domain.prototype.exit = function() {};
/**
* @return {domain.Domain}
*/
domain.create = function() {};
module.exports.Domain = domain.Domain;
module.exports.create = domain.create;
/**
* @type {domain.Domain}
*/
domain.active;
module.exports.active = domain.active;

View File

@@ -0,0 +1,149 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "events"
*/
var events = function() {};
/**
* @constructor
* @extends {NodeJS.EventEmitter}
*/
events.EventEmitter;
/**
* @type {events.EventEmitter}
*/
events.EventEmitter.EventEmitter;
/**
* @param {events.EventEmitter} emitter
* @param {string} event
* @return {number}
*/
events.EventEmitter.listenerCount = function(emitter, event) {};
/**
* @type {number}
*/
events.EventEmitter.defaultMaxListeners;
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
events.EventEmitter.prototype.removeListener = function(event, listener) {};
/**
* @param {string=} event
* @return {*}
*/
events.EventEmitter.prototype.removeAllListeners = function(event) {};
/**
* @param {number} n
* @return {*}
*/
events.EventEmitter.prototype.setMaxListeners = function(n) {};
/**
* @return {number}
*/
events.EventEmitter.prototype.getMaxListeners = function() {};
/**
* @param {string} event
* @return {Array<Function>}
*/
events.EventEmitter.prototype.listeners = function(event) {};
/**
* @param {string} event
* @param {...*} args
* @return {boolean}
*/
events.EventEmitter.prototype.emit = function(event, args) {};
/**
* @return {Array<string>}
*/
events.EventEmitter.prototype.eventNames = function() {};
/**
* @param {string} type
* @return {number}
*/
events.EventEmitter.prototype.listenerCount = function(type) {};
module.exports = events;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,652 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "http"
*/
var http = {};
var net = require("net");
/**
* @interface
*/
http.RequestOptions = function() {};
/**
* @type {string}
*/
http.RequestOptions.prototype.protocol;
/**
* @type {string}
*/
http.RequestOptions.prototype.host;
/**
* @type {string}
*/
http.RequestOptions.prototype.hostname;
/**
* @type {number}
*/
http.RequestOptions.prototype.family;
/**
* @type {number}
*/
http.RequestOptions.prototype.port;
/**
* @type {string}
*/
http.RequestOptions.prototype.localAddress;
/**
* @type {string}
*/
http.RequestOptions.prototype.socketPath;
/**
* @type {string}
*/
http.RequestOptions.prototype.method;
/**
* @type {string}
*/
http.RequestOptions.prototype.path;
http.RequestOptions.prototype.headers;
/**
* @type {string}
*/
http.RequestOptions.prototype.auth;
/**
* @type {(http.Agent|boolean)}
*/
http.RequestOptions.prototype.agent;
/**
* @interface
* @extends {net.Server}
*/
http.Server = function() {};
/**
* @param {number} msecs
* @param {Function} callback
* @return {void}
*/
http.Server.prototype.setTimeout = function(msecs, callback) {};
/**
* @type {number}
*/
http.Server.prototype.maxHeadersCount;
/**
* @type {number}
*/
http.Server.prototype.timeout;
/**
* @type {boolean}
*/
http.Server.prototype.listening;
/**
* @interface
* @extends {http.IncomingMessage}
*/
http.ServerRequest = function() {};
/**
* @type {net.Socket}
*/
http.ServerRequest.prototype.connection;
/**
* @interface
* @extends {internal.Writable}
*/
http.ServerResponse = function() {};
/**
* @param {Buffer} buffer
* @return {boolean}
*/
http.ServerResponse.prototype.write = function(buffer) {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {boolean}
*/
http.ServerResponse.prototype.write = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {boolean}
*/
http.ServerResponse.prototype.write = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
http.ServerResponse.prototype.write = function(str, encoding, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {string=} fd
* @return {boolean}
*/
http.ServerResponse.prototype.write = function(str, encoding, fd) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @return {*}
*/
http.ServerResponse.prototype.write = function(chunk, encoding) {};
/**
* @return {void}
*/
http.ServerResponse.prototype.writeContinue = function() {};
/**
* @param {number} statusCode
* @param {string=} reasonPhrase
* @param {*=} headers
* @return {void}
*/
http.ServerResponse.prototype.writeHead = function(statusCode, reasonPhrase, headers) {};
/**
* @param {number} statusCode
* @param {*=} headers
* @return {void}
*/
http.ServerResponse.prototype.writeHead = function(statusCode, headers) {};
/**
* @type {number}
*/
http.ServerResponse.prototype.statusCode;
/**
* @type {string}
*/
http.ServerResponse.prototype.statusMessage;
/**
* @type {boolean}
*/
http.ServerResponse.prototype.headersSent;
/**
* @param {string} name
* @param {(string|Array<string>)} value
* @return {void}
*/
http.ServerResponse.prototype.setHeader = function(name, value) {};
/**
* @param {number} msecs
* @param {Function} callback
* @return {http.ServerResponse}
*/
http.ServerResponse.prototype.setTimeout = function(msecs, callback) {};
/**
* @type {boolean}
*/
http.ServerResponse.prototype.sendDate;
/**
* @param {string} name
* @return {string}
*/
http.ServerResponse.prototype.getHeader = function(name) {};
/**
* @param {string} name
* @return {void}
*/
http.ServerResponse.prototype.removeHeader = function(name) {};
/**
* @param {*} headers
* @return {void}
*/
http.ServerResponse.prototype.addTrailers = function(headers) {};
/**
* @type {boolean}
*/
http.ServerResponse.prototype.finished;
/**
* @return {void}
*/
http.ServerResponse.prototype.end = function() {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {void}
*/
http.ServerResponse.prototype.end = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {void}
*/
http.ServerResponse.prototype.end = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
http.ServerResponse.prototype.end = function(str, encoding, cb) {};
/**
* @param {*=} data
* @param {string=} encoding
* @return {void}
*/
http.ServerResponse.prototype.end = function(data, encoding) {};
/**
* @interface
* @extends {internal.Writable}
*/
http.ClientRequest = function() {};
/**
* @param {Buffer} buffer
* @return {boolean}
*/
http.ClientRequest.prototype.write = function(buffer) {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {boolean}
*/
http.ClientRequest.prototype.write = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {boolean}
*/
http.ClientRequest.prototype.write = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
http.ClientRequest.prototype.write = function(str, encoding, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {string=} fd
* @return {boolean}
*/
http.ClientRequest.prototype.write = function(str, encoding, fd) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @return {void}
*/
http.ClientRequest.prototype.write = function(chunk, encoding) {};
/**
* @return {void}
*/
http.ClientRequest.prototype.abort = function() {};
/**
* @param {number} timeout
* @param {Function=} callback
* @return {void}
*/
http.ClientRequest.prototype.setTimeout = function(timeout, callback) {};
/**
* @param {boolean=} noDelay
* @return {void}
*/
http.ClientRequest.prototype.setNoDelay = function(noDelay) {};
/**
* @param {boolean=} enable
* @param {number=} initialDelay
* @return {void}
*/
http.ClientRequest.prototype.setSocketKeepAlive = function(enable, initialDelay) {};
/**
* @param {string} name
* @param {(string|Array<string>)} value
* @return {void}
*/
http.ClientRequest.prototype.setHeader = function(name, value) {};
/**
* @param {string} name
* @return {string}
*/
http.ClientRequest.prototype.getHeader = function(name) {};
/**
* @param {string} name
* @return {void}
*/
http.ClientRequest.prototype.removeHeader = function(name) {};
/**
* @param {*} headers
* @return {void}
*/
http.ClientRequest.prototype.addTrailers = function(headers) {};
/**
* @return {void}
*/
http.ClientRequest.prototype.end = function() {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {void}
*/
http.ClientRequest.prototype.end = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {void}
*/
http.ClientRequest.prototype.end = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
http.ClientRequest.prototype.end = function(str, encoding, cb) {};
/**
* @param {*=} data
* @param {string=} encoding
* @return {void}
*/
http.ClientRequest.prototype.end = function(data, encoding) {};
/**
* @interface
* @extends {internal.Readable}
*/
http.IncomingMessage = function() {};
/**
* @type {string}
*/
http.IncomingMessage.prototype.httpVersion;
/**
* @type {string}
*/
http.IncomingMessage.prototype.httpVersionMajor;
/**
* @type {string}
*/
http.IncomingMessage.prototype.httpVersionMinor;
/**
* @type {net.Socket}
*/
http.IncomingMessage.prototype.connection;
/**
* @type {*}
*/
http.IncomingMessage.prototype.headers;
/**
* @type {Array<string>}
*/
http.IncomingMessage.prototype.rawHeaders;
/**
* @type {*}
*/
http.IncomingMessage.prototype.trailers;
/**
* @type {*}
*/
http.IncomingMessage.prototype.rawTrailers;
/**
* @param {number} msecs
* @param {Function} callback
* @return {NodeJS.Timer}
*/
http.IncomingMessage.prototype.setTimeout = function(msecs, callback) {};
/**
* @type {string}
*/
http.IncomingMessage.prototype.method;
/**
* @type {string}
*/
http.IncomingMessage.prototype.url;
/**
* @type {number}
*/
http.IncomingMessage.prototype.statusCode;
/**
* @type {string}
*/
http.IncomingMessage.prototype.statusMessage;
/**
* @type {net.Socket}
*/
http.IncomingMessage.prototype.socket;
/**
* @param {Error=} error
* @return {void}
*/
http.IncomingMessage.prototype.destroy = function(error) {};
/**
* @interface
* @extends {http.IncomingMessage}
*/
http.ClientResponse = function() {};
/**
* @interface
*/
http.AgentOptions = function() {};
/**
* @type {boolean}
*/
http.AgentOptions.prototype.keepAlive;
/**
* @type {number}
*/
http.AgentOptions.prototype.keepAliveMsecs;
/**
* @type {number}
*/
http.AgentOptions.prototype.maxSockets;
/**
* @type {number}
*/
http.AgentOptions.prototype.maxFreeSockets;
/**
* @param {http.AgentOptions=} opts
* @return {http.Agent}
* @constructor
*/
http.Agent = function(opts) {};
/**
* @type {number}
*/
http.Agent.prototype.maxSockets;
/**
* @type {*}
*/
http.Agent.prototype.sockets;
/**
* @type {*}
*/
http.Agent.prototype.requests;
/**
* @return {void}
*/
http.Agent.prototype.destroy = function() {};
/**
* @type {Array<string>}
*/
http.METHODS;
http.STATUS_CODES;
/**
* @param {(function(http.IncomingMessage, http.ServerResponse): void)=} requestListener
* @return {http.Server}
*/
http.createServer = function(requestListener) {};
/**
* @param {number=} port
* @param {string=} host
* @return {*}
*/
http.createClient = function(port, host) {};
/**
* @param {http.RequestOptions} options
* @param {(function(http.IncomingMessage): void)=} callback
* @return {http.ClientRequest}
*/
http.request = function(options, callback) {};
/**
* @param {*} options
* @param {(function(http.IncomingMessage): void)=} callback
* @return {http.ClientRequest}
*/
http.get = function(options, callback) {};
/**
* @type {http.Agent}
*/
http.globalAgent;
module.exports.RequestOptions = http.RequestOptions;
module.exports.Server = http.Server;
module.exports.ServerRequest = http.ServerRequest;
module.exports.ServerResponse = http.ServerResponse;
module.exports.ClientRequest = http.ClientRequest;
module.exports.IncomingMessage = http.IncomingMessage;
module.exports.ClientResponse = http.ClientResponse;
module.exports.AgentOptions = http.AgentOptions;
module.exports.Agent = http.Agent;
module.exports.METHODS = http.METHODS;
module.exports.STATUS_CODES = http.STATUS_CODES;
module.exports.createServer = http.createServer;
module.exports.createClient = http.createClient;
module.exports.request = http.request;
module.exports.get = http.get;
module.exports.globalAgent = http.globalAgent;

View File

@@ -0,0 +1,270 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "https"
*/
var https = {};
var tls = require("tls");
var http = require("http");
/**
* @interface
*/
https.ServerOptions = function() {};
/**
* @type {*}
*/
https.ServerOptions.prototype.pfx;
/**
* @type {*}
*/
https.ServerOptions.prototype.key;
/**
* @type {string}
*/
https.ServerOptions.prototype.passphrase;
/**
* @type {*}
*/
https.ServerOptions.prototype.cert;
/**
* @type {*}
*/
https.ServerOptions.prototype.ca;
/**
* @type {*}
*/
https.ServerOptions.prototype.crl;
/**
* @type {string}
*/
https.ServerOptions.prototype.ciphers;
/**
* @type {boolean}
*/
https.ServerOptions.prototype.honorCipherOrder;
/**
* @type {boolean}
*/
https.ServerOptions.prototype.requestCert;
/**
* @type {boolean}
*/
https.ServerOptions.prototype.rejectUnauthorized;
/**
* @type {*}
*/
https.ServerOptions.prototype.NPNProtocols;
/**
* @type {(function(string, (function(Error, tls.SecureContext): *)): *)}
*/
https.ServerOptions.prototype.SNICallback;
/**
* @interface
* @extends {http.RequestOptions}
*/
https.RequestOptions = function() {};
/**
* @type {*}
*/
https.RequestOptions.prototype.pfx;
/**
* @type {*}
*/
https.RequestOptions.prototype.key;
/**
* @type {string}
*/
https.RequestOptions.prototype.passphrase;
/**
* @type {*}
*/
https.RequestOptions.prototype.cert;
/**
* @type {*}
*/
https.RequestOptions.prototype.ca;
/**
* @type {string}
*/
https.RequestOptions.prototype.ciphers;
/**
* @type {boolean}
*/
https.RequestOptions.prototype.rejectUnauthorized;
/**
* @type {string}
*/
https.RequestOptions.prototype.secureProtocol;
/**
* @interface
* @extends {http.Agent}
*/
https.Agent = function() {};
/**
* @interface
* @extends {http.AgentOptions}
*/
https.AgentOptions = function() {};
/**
* @type {*}
*/
https.AgentOptions.prototype.pfx;
/**
* @type {*}
*/
https.AgentOptions.prototype.key;
/**
* @type {string}
*/
https.AgentOptions.prototype.passphrase;
/**
* @type {*}
*/
https.AgentOptions.prototype.cert;
/**
* @type {*}
*/
https.AgentOptions.prototype.ca;
/**
* @type {string}
*/
https.AgentOptions.prototype.ciphers;
/**
* @type {boolean}
*/
https.AgentOptions.prototype.rejectUnauthorized;
/**
* @type {string}
*/
https.AgentOptions.prototype.secureProtocol;
/**
* @type {number}
*/
https.AgentOptions.prototype.maxCachedSessions;
/**
* @type {(function(new: https.Agent, https.AgentOptions=))}
*/
https.Agent;
/**
* @interface
* @extends {tls.Server}
*/
https.Server = function() {};
/**
* @param {https.ServerOptions} options
* @param {Function=} requestListener
* @return {https.Server}
*/
https.createServer = function(options, requestListener) {};
/**
* @param {https.RequestOptions} options
* @param {(function(http.IncomingMessage): void)=} callback
* @return {http.ClientRequest}
*/
https.request = function(options, callback) {};
/**
* @param {https.RequestOptions} options
* @param {(function(http.IncomingMessage): void)=} callback
* @return {http.ClientRequest}
*/
https.get = function(options, callback) {};
/**
* @type {https.Agent}
*/
https.globalAgent;
module.exports.ServerOptions = https.ServerOptions;
module.exports.RequestOptions = https.RequestOptions;
module.exports.Agent = https.Agent;
module.exports.AgentOptions = https.AgentOptions;
module.exports.Agent = https.Agent;
module.exports.Server = https.Server;
module.exports.createServer = https.createServer;
module.exports.request = https.request;
module.exports.get = https.get;
module.exports.globalAgent = https.globalAgent;

View File

@@ -0,0 +1,146 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "module"
*/
/**
* @param {string} id
* @param {Module} parent
* @return {Module}
* @constructor
*/
var Module = function(id, parent) {};
/**
* @type {Module}
*/
Module.Module;
/**
* @type {Array<string>}
*/
Module.globalPaths;
/**
* @type {Array<string>}
*/
Module.wrapper;
/**
* @param {string} script
* @return {string}
*/
Module.wrap = function(script) {};
/**
* @return {void}
*/
Module.runMain = function() {};
/**
* @return {Object}
*/
Module.requireRepl = function() {};
/**
* @type {Object}
*/
Module._cache;
/**
* @type {Object}
*/
Module._pathCache;
/**
* @type {Object}
*/
Module._realpathCache;
/**
* @type {Object}
*/
Module._extensions;
/**
* @type {Function}
*/
Module._debug;
/**
* @type {Function}
*/
Module._findPath;
/**
* @type {Function}
*/
Module._nodeModulePaths;
/**
* @type {Function}
*/
Module._resolveLookupPaths;
/**
* @type {Function}
*/
Module._load;
/**
* @type {Function}
*/
Module._resolveFilename;
/**
* @type {Function}
*/
Module._initPaths;
/**
* @type {Function}
*/
Module._preloadModules;
/**
* @param {string} id
* @return {*}
*/
Module.prototype.require = function(id) {};
module.exports = Module;

View File

@@ -0,0 +1,488 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "net"
*/
var net = {};
/**
* @interface
* @extends {internal.Duplex}
*/
net.Socket = function() {};
/**
* @param {Buffer} buffer
* @return {boolean}
*/
net.Socket.prototype.write = function(buffer) {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {boolean}
*/
net.Socket.prototype.write = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {boolean}
*/
net.Socket.prototype.write = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
net.Socket.prototype.write = function(str, encoding, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {string=} fd
* @return {boolean}
*/
net.Socket.prototype.write = function(str, encoding, fd) {};
/**
* @param {*} data
* @param {string=} encoding
* @param {Function=} callback
* @return {void}
*/
net.Socket.prototype.write = function(data, encoding, callback) {};
/**
* @param {number} port
* @param {string=} host
* @param {Function=} connectionListener
* @return {void}
*/
net.Socket.prototype.connect = function(port, host, connectionListener) {};
/**
* @param {string} path
* @param {Function=} connectionListener
* @return {void}
*/
net.Socket.prototype.connect = function(path, connectionListener) {};
/**
* @type {number}
*/
net.Socket.prototype.bufferSize;
/**
* @param {string=} encoding
* @return {void}
*/
net.Socket.prototype.setEncoding = function(encoding) {};
/**
* @return {void}
*/
net.Socket.prototype.destroy = function() {};
/**
* @return {net.Socket}
*/
net.Socket.prototype.pause = function() {};
/**
* @return {net.Socket}
*/
net.Socket.prototype.resume = function() {};
/**
* @param {number} timeout
* @param {Function=} callback
* @return {void}
*/
net.Socket.prototype.setTimeout = function(timeout, callback) {};
/**
* @param {boolean=} noDelay
* @return {void}
*/
net.Socket.prototype.setNoDelay = function(noDelay) {};
/**
* @param {boolean=} enable
* @param {number=} initialDelay
* @return {void}
*/
net.Socket.prototype.setKeepAlive = function(enable, initialDelay) {};
/**
* @return {{port: number, family: string, address: string}}
*/
net.Socket.prototype.address = function() {};
/**
* @return {void}
*/
net.Socket.prototype.unref = function() {};
/**
* @return {void}
*/
net.Socket.prototype.ref = function() {};
/**
* @type {string}
*/
net.Socket.prototype.remoteAddress;
/**
* @type {string}
*/
net.Socket.prototype.remoteFamily;
/**
* @type {number}
*/
net.Socket.prototype.remotePort;
/**
* @type {string}
*/
net.Socket.prototype.localAddress;
/**
* @type {number}
*/
net.Socket.prototype.localPort;
/**
* @type {number}
*/
net.Socket.prototype.bytesRead;
/**
* @type {number}
*/
net.Socket.prototype.bytesWritten;
/**
* @return {void}
*/
net.Socket.prototype.end = function() {};
/**
* @param {Buffer} buffer
* @param {Function=} cb
* @return {void}
*/
net.Socket.prototype.end = function(buffer, cb) {};
/**
* @param {string} str
* @param {Function=} cb
* @return {void}
*/
net.Socket.prototype.end = function(str, cb) {};
/**
* @param {string} str
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
net.Socket.prototype.end = function(str, encoding, cb) {};
/**
* @param {*=} data
* @param {string=} encoding
* @return {void}
*/
net.Socket.prototype.end = function(data, encoding) {};
/**
* @type {(function(new: net.Socket, {fd: string, type: string, allowHalfOpen: boolean}=))}
*/
net.Socket;
/**
* @interface
*/
net.ListenOptions = function() {};
/**
* @type {number}
*/
net.ListenOptions.prototype.port;
/**
* @type {string}
*/
net.ListenOptions.prototype.host;
/**
* @type {number}
*/
net.ListenOptions.prototype.backlog;
/**
* @type {string}
*/
net.ListenOptions.prototype.path;
/**
* @type {boolean}
*/
net.ListenOptions.prototype.exclusive;
/**
* @interface
* @extends {net.Socket}
*/
net.Server = function() {};
/**
* @param {number} port
* @param {string=} hostname
* @param {number=} backlog
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(port, hostname, backlog, listeningListener) {};
/**
* @param {number} port
* @param {string=} hostname
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(port, hostname, listeningListener) {};
/**
* @param {number} port
* @param {number=} backlog
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(port, backlog, listeningListener) {};
/**
* @param {number} port
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(port, listeningListener) {};
/**
* @param {string} path
* @param {number=} backlog
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(path, backlog, listeningListener) {};
/**
* @param {string} path
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(path, listeningListener) {};
/**
* @param {*} handle
* @param {number=} backlog
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(handle, backlog, listeningListener) {};
/**
* @param {*} handle
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(handle, listeningListener) {};
/**
* @param {net.ListenOptions} options
* @param {Function=} listeningListener
* @return {net.Server}
*/
net.Server.prototype.listen = function(options, listeningListener) {};
/**
* @param {Function=} callback
* @return {net.Server}
*/
net.Server.prototype.close = function(callback) {};
/**
* @return {{port: number, family: string, address: string}}
*/
net.Server.prototype.address = function() {};
/**
* @param {(function(Error, number): void)} cb
* @return {void}
*/
net.Server.prototype.getConnections = function(cb) {};
/**
* @return {net.Server}
*/
net.Server.prototype.ref = function() {};
/**
* @return {net.Server}
*/
net.Server.prototype.unref = function() {};
/**
* @type {number}
*/
net.Server.prototype.maxConnections;
/**
* @type {number}
*/
net.Server.prototype.connections;
/**
* @param {(function(net.Socket): void)=} connectionListener
* @return {net.Server}
*/
net.createServer = function(connectionListener) {};
/**
* @param {{allowHalfOpen: boolean}=} options
* @param {(function(net.Socket): void)=} connectionListener
* @return {net.Server}
*/
net.createServer = function(options, connectionListener) {};
/**
* @param {{port: number, host: string, localAddress: string, localPort: string, family: number, allowHalfOpen: boolean}} options
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.connect = function(options, connectionListener) {};
/**
* @param {number} port
* @param {string=} host
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.connect = function(port, host, connectionListener) {};
/**
* @param {string} path
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.connect = function(path, connectionListener) {};
/**
* @param {{port: number, host: string, localAddress: string, localPort: string, family: number, allowHalfOpen: boolean}} options
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.createConnection = function(options, connectionListener) {};
/**
* @param {number} port
* @param {string=} host
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.createConnection = function(port, host, connectionListener) {};
/**
* @param {string} path
* @param {Function=} connectionListener
* @return {net.Socket}
*/
net.createConnection = function(path, connectionListener) {};
/**
* @param {string} input
* @return {number}
*/
net.isIP = function(input) {};
/**
* @param {string} input
* @return {boolean}
*/
net.isIPv4 = function(input) {};
/**
* @param {string} input
* @return {boolean}
*/
net.isIPv6 = function(input) {};
module.exports.Socket = net.Socket;
module.exports.Socket = net.Socket;
module.exports.ListenOptions = net.ListenOptions;
module.exports.Server = net.Server;
module.exports.createServer = net.createServer;
module.exports.createServer = net.createServer;
module.exports.connect = net.connect;
module.exports.connect = net.connect;
module.exports.connect = net.connect;
module.exports.createConnection = net.createConnection;
module.exports.createConnection = net.createConnection;
module.exports.createConnection = net.createConnection;
module.exports.isIP = net.isIP;
module.exports.isIPv4 = net.isIPv4;
module.exports.isIPv6 = net.isIPv6;

View File

@@ -0,0 +1,258 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "os"
*/
var os = {};
/**
* @interface
*/
os.CpuInfo = function() {};
/**
* @type {string}
*/
os.CpuInfo.prototype.model;
/**
* @type {number}
*/
os.CpuInfo.prototype.speed;
os.CpuInfo.prototype.times;
/**
* @type {number}
*/
os.CpuInfo.prototype.times.user;
/**
* @type {number}
*/
os.CpuInfo.prototype.times.nice;
/**
* @type {number}
*/
os.CpuInfo.prototype.times.sys;
/**
* @type {number}
*/
os.CpuInfo.prototype.times.idle;
/**
* @type {number}
*/
os.CpuInfo.prototype.times.irq;
/**
* @interface
*/
os.NetworkInterfaceInfo = function() {};
/**
* @type {string}
*/
os.NetworkInterfaceInfo.prototype.address;
/**
* @type {string}
*/
os.NetworkInterfaceInfo.prototype.netmask;
/**
* @type {string}
*/
os.NetworkInterfaceInfo.prototype.family;
/**
* @type {string}
*/
os.NetworkInterfaceInfo.prototype.mac;
/**
* @type {boolean}
*/
os.NetworkInterfaceInfo.prototype.internal;
/**
* @return {string}
*/
os.hostname = function() {};
/**
* @return {Array<number>}
*/
os.loadavg = function() {};
/**
* @return {number}
*/
os.uptime = function() {};
/**
* @return {number}
*/
os.freemem = function() {};
/**
* @return {number}
*/
os.totalmem = function() {};
/**
* @return {Array<os.CpuInfo>}
*/
os.cpus = function() {};
/**
* @return {string}
*/
os.type = function() {};
/**
* @return {string}
*/
os.release = function() {};
/**
* @return {Object<string,Array<os.NetworkInterfaceInfo>>}
*/
os.networkInterfaces = function() {};
/**
* @return {string}
*/
os.homedir = function() {};
/**
* @param {{encoding: string}=} options
* @return {{username: string, uid: number, gid: number, shell: *, homedir: string}}
*/
os.userInfo = function(options) {};
os.constants;
/**
* @type {number}
*/
os.constants.UV_UDP_REUSEADDR;
/**
* @type {{SIGHUP: number, SIGINT: number, SIGQUIT: number, SIGILL: number, SIGTRAP: number, SIGABRT: number, SIGIOT: number, SIGBUS: number, SIGFPE: number, SIGKILL: number, SIGUSR1: number, SIGSEGV: number, SIGUSR2: number, SIGPIPE: number, SIGALRM: number, SIGTERM: number, SIGCHLD: number, SIGSTKFLT: number, SIGCONT: number, SIGSTOP: number, SIGTSTP: number, SIGTTIN: number, SIGTTOU: number, SIGURG: number, SIGXCPU: number, SIGXFSZ: number, SIGVTALRM: number, SIGPROF: number, SIGWINCH: number, SIGIO: number, SIGPOLL: number, SIGPWR: number, SIGSYS: number, SIGUNUSED: number}}
*/
os.constants.errno;
/**
* @type {{E2BIG: number, EACCES: number, EADDRINUSE: number, EADDRNOTAVAIL: number, EAFNOSUPPORT: number, EAGAIN: number, EALREADY: number, EBADF: number, EBADMSG: number, EBUSY: number, ECANCELED: number, ECHILD: number, ECONNABORTED: number, ECONNREFUSED: number, ECONNRESET: number, EDEADLK: number, EDESTADDRREQ: number, EDOM: number, EDQUOT: number, EEXIST: number, EFAULT: number, EFBIG: number, EHOSTUNREACH: number, EIDRM: number, EILSEQ: number, EINPROGRESS: number, EINTR: number, EINVAL: number, EIO: number, EISCONN: number, EISDIR: number, ELOOP: number, EMFILE: number, EMLINK: number, EMSGSIZE: number, EMULTIHOP: number, ENAMETOOLONG: number, ENETDOWN: number, ENETRESET: number, ENETUNREACH: number, ENFILE: number, ENOBUFS: number, ENODATA: number, ENODEV: number, ENOENT: number, ENOEXEC: number, ENOLCK: number, ENOLINK: number, ENOMEM: number, ENOMSG: number, ENOPROTOOPT: number, ENOSPC: number, ENOSR: number, ENOSTR: number, ENOSYS: number, ENOTCONN: number, ENOTDIR: number, ENOTEMPTY: number, ENOTSOCK: number, ENOTSUP: number, ENOTTY: number, ENXIO: number, EOPNOTSUPP: number, EOVERFLOW: number, EPERM: number, EPIPE: number, EPROTO: number, EPROTONOSUPPORT: number, EPROTOTYPE: number, ERANGE: number, EROFS: number, ESPIPE: number, ESRCH: number, ESTALE: number, ETIME: number, ETIMEDOUT: number, ETXTBSY: number, EWOULDBLOCK: number, EXDEV: number}}
*/
os.constants.signals;
/**
* @return {string}
*/
os.arch = function() {};
/**
* @return {string}
*/
os.platform = function() {};
/**
* @return {string}
*/
os.tmpdir = function() {};
/**
* @type {string}
*/
os.EOL;
/**
* @return {(string)}
*/
os.endianness = function() {};
module.exports.CpuInfo = os.CpuInfo;
module.exports.NetworkInterfaceInfo = os.NetworkInterfaceInfo;
module.exports.hostname = os.hostname;
module.exports.loadavg = os.loadavg;
module.exports.uptime = os.uptime;
module.exports.freemem = os.freemem;
module.exports.totalmem = os.totalmem;
module.exports.cpus = os.cpus;
module.exports.type = os.type;
module.exports.release = os.release;
module.exports.networkInterfaces = os.networkInterfaces;
module.exports.homedir = os.homedir;
module.exports.userInfo = os.userInfo;
module.exports.constants = os.constants;
module.exports.arch = os.arch;
module.exports.platform = os.platform;
module.exports.tmpdir = os.tmpdir;
module.exports.EOL = os.EOL;
module.exports.endianness = os.endianness;
/**
* @return {string}
*/
os.tmpDir = function() {};
module.exports.tmpDir = os.tmpDir;

View File

@@ -0,0 +1,356 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "path"
*/
var path = {};
/**
* @interface
*/
path.ParsedPath = function() {};
/**
* @type {string}
*/
path.ParsedPath.prototype.root;
/**
* @type {string}
*/
path.ParsedPath.prototype.dir;
/**
* @type {string}
*/
path.ParsedPath.prototype.base;
/**
* @type {string}
*/
path.ParsedPath.prototype.ext;
/**
* @type {string}
*/
path.ParsedPath.prototype.name;
/**
* @param {string} p
* @return {string}
*/
path.normalize = function(p) {};
/**
* @param {...*} paths
* @return {string}
*/
path.join = function(paths) {};
/**
* @param {...string} paths
* @return {string}
*/
path.join = function(paths) {};
/**
* @param {...*} pathSegments
* @return {string}
*/
path.resolve = function(pathSegments) {};
/**
* @param {string} path
* @return {boolean}
*/
path.isAbsolute = function(path) {};
/**
* @param {string} from
* @param {string} to
* @return {string}
*/
path.relative = function(from, to) {};
/**
* @param {string} p
* @return {string}
*/
path.dirname = function(p) {};
/**
* @param {string} p
* @param {string=} ext
* @return {string}
*/
path.basename = function(p, ext) {};
/**
* @param {string} p
* @return {string}
*/
path.extname = function(p) {};
/**
* @type {string}
*/
path.sep;
/**
* @type {string}
*/
path.delimiter;
/**
* @param {string} pathString
* @return {path.ParsedPath}
*/
path.parse = function(pathString) {};
/**
* @param {path.ParsedPath} pathObject
* @return {string}
*/
path.format = function(pathObject) {};
path.posix = path.posix || {};
/**
* @param {string} p
* @return {string}
*/
path.posix.normalize = function(p) {};
/**
* @param {...*} paths
* @return {string}
*/
path.posix.join = function(paths) {};
/**
* @param {...*} pathSegments
* @return {string}
*/
path.posix.resolve = function(pathSegments) {};
/**
* @param {string} p
* @return {boolean}
*/
path.posix.isAbsolute = function(p) {};
/**
* @param {string} from
* @param {string} to
* @return {string}
*/
path.posix.relative = function(from, to) {};
/**
* @param {string} p
* @return {string}
*/
path.posix.dirname = function(p) {};
/**
* @param {string} p
* @param {string=} ext
* @return {string}
*/
path.posix.basename = function(p, ext) {};
/**
* @param {string} p
* @return {string}
*/
path.posix.extname = function(p) {};
/**
* @type {string}
*/
path.posix.sep;
/**
* @type {string}
*/
path.posix.delimiter;
/**
* @param {string} p
* @return {path.ParsedPath}
*/
path.posix.parse = function(p) {};
/**
* @param {path.ParsedPath} pP
* @return {string}
*/
path.posix.format = function(pP) {};
path.win32 = path.win32 || {};
/**
* @param {string} p
* @return {string}
*/
path.win32.normalize = function(p) {};
/**
* @param {...*} paths
* @return {string}
*/
path.win32.join = function(paths) {};
/**
* @param {...*} pathSegments
* @return {string}
*/
path.win32.resolve = function(pathSegments) {};
/**
* @param {string} p
* @return {boolean}
*/
path.win32.isAbsolute = function(p) {};
/**
* @param {string} from
* @param {string} to
* @return {string}
*/
path.win32.relative = function(from, to) {};
/**
* @param {string} p
* @return {string}
*/
path.win32.dirname = function(p) {};
/**
* @param {string} p
* @param {string=} ext
* @return {string}
*/
path.win32.basename = function(p, ext) {};
/**
* @param {string} p
* @return {string}
*/
path.win32.extname = function(p) {};
/**
* @type {string}
*/
path.win32.sep;
/**
* @type {string}
*/
path.win32.delimiter;
/**
* @param {string} p
* @return {path.ParsedPath}
*/
path.win32.parse = function(p) {};
/**
* @param {path.ParsedPath} pP
* @return {string}
*/
path.win32.format = function(pP) {};
module.exports.ParsedPath = path.ParsedPath;
module.exports.normalize = path.normalize;
module.exports.join = path.join;
module.exports.join = path.join;
module.exports.resolve = path.resolve;
module.exports.isAbsolute = path.isAbsolute;
module.exports.relative = path.relative;
module.exports.dirname = path.dirname;
module.exports.basename = path.basename;
module.exports.extname = path.extname;
module.exports.sep = path.sep;
module.exports.delimiter = path.delimiter;
module.exports.parse = path.parse;
module.exports.format = path.format;
module.exports.posix = path.posix;
module.exports.win32 = path.win32;
/**
* @param {string} path
* @return {string}
*/
path._makeLong = function(path) {};
module.exports._makeLong = path._makeLong;
/**
* @param {string} path
* @param {(function(boolean): *)} callback
* @return {boolean}
*/
path.exists = function(path, callback) {};
/**
* @param {string} path
* @return {boolean}
*/
path.existsSync = function(path) {};
module.exports.exists = path.exists;
module.exports.existsSync = path.existsSync;

View File

@@ -0,0 +1,41 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "process"
*/
module.exports = process;

View File

@@ -0,0 +1,104 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "punycode"
*/
var punycode = {};
/**
* @param {string} string
* @return {string}
*/
punycode.decode = function(string) {};
/**
* @param {string} string
* @return {string}
*/
punycode.encode = function(string) {};
/**
* @param {string} domain
* @return {string}
*/
punycode.toUnicode = function(domain) {};
/**
* @param {string} domain
* @return {string}
*/
punycode.toASCII = function(domain) {};
/**
* @type {punycode.ucs2}
*/
punycode.ucs2;
/**
* @interface
*/
function ucs2() {}
/**
* @param {string} string
* @return {Array<number>}
*/
ucs2.prototype.decode = function(string) {};
/**
* @param {Array<number>} codePoints
* @return {string}
*/
ucs2.prototype.encode = function(codePoints) {};
/**
* @type {*}
*/
punycode.version;
module.exports.decode = punycode.decode;
module.exports.encode = punycode.encode;
module.exports.toUnicode = punycode.toUnicode;
module.exports.toASCII = punycode.toASCII;
module.exports.ucs2 = punycode.ucs2;
module.exports.version = punycode.version;

View File

@@ -0,0 +1,130 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "querystring"
*/
var querystring = {};
/**
* @interface
*/
querystring.StringifyOptions = function() {};
/**
* @type {Function}
*/
querystring.StringifyOptions.prototype.encodeURIComponent;
/**
* @interface
*/
querystring.ParseOptions = function() {};
/**
* @type {number}
*/
querystring.ParseOptions.prototype.maxKeys;
/**
* @type {Function}
*/
querystring.ParseOptions.prototype.decodeURIComponent;
/**
* @template T
* @param {T} obj
* @param {string=} sep
* @param {string=} eq
* @param {querystring.StringifyOptions=} options
* @return {string}
*/
querystring.stringify = function(obj, sep, eq, options) {};
/**
* @param {string} str
* @param {string=} sep
* @param {string=} eq
* @param {querystring.ParseOptions=} options
* @return {*}
*/
querystring.parse = function(str, sep, eq, options) {};
/**
* @template T
* @param {string} str
* @param {string=} sep
* @param {string=} eq
* @param {querystring.ParseOptions=} options
* @return {T}
*/
querystring.parse = function(str, sep, eq, options) {};
/**
* @param {string} str
* @return {string}
*/
querystring.escape = function(str) {};
/**
* @param {string} str
* @return {string}
*/
querystring.unescape = function(str) {};
module.exports.StringifyOptions = querystring.StringifyOptions;
module.exports.ParseOptions = querystring.ParseOptions;
module.exports.stringify = querystring.stringify;
module.exports.parse = querystring.parse;
module.exports.parse = querystring.parse;
module.exports.escape = querystring.escape;
module.exports.unescape = querystring.unescape;
/**
* @param {Buffer} s
* @param {boolean} decodeSpaces
* @return {void}
*/
querystring.unescapeBuffer = function(s, decodeSpaces) {};
module.exports.unescapeBuffer = querystring.unescapeBuffer;

View File

@@ -0,0 +1,247 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "readline"
*/
var readline = {};
var events = require("events");
var stream = require("stream");
/**
* @interface
*/
readline.Key = function() {};
/**
* @type {string}
*/
readline.Key.prototype.sequence;
/**
* @type {string}
*/
readline.Key.prototype.name;
/**
* @type {boolean}
*/
readline.Key.prototype.ctrl;
/**
* @type {boolean}
*/
readline.Key.prototype.meta;
/**
* @type {boolean}
*/
readline.Key.prototype.shift;
/**
* @interface
* @extends {events.EventEmitter}
*/
readline.ReadLine = function() {};
/**
* @param {string} prompt
* @return {void}
*/
readline.ReadLine.prototype.setPrompt = function(prompt) {};
/**
* @param {boolean=} preserveCursor
* @return {void}
*/
readline.ReadLine.prototype.prompt = function(preserveCursor) {};
/**
* @param {string} query
* @param {(function(string): void)} callback
* @return {void}
*/
readline.ReadLine.prototype.question = function(query, callback) {};
/**
* @return {readline.ReadLine}
*/
readline.ReadLine.prototype.pause = function() {};
/**
* @return {readline.ReadLine}
*/
readline.ReadLine.prototype.resume = function() {};
/**
* @return {void}
*/
readline.ReadLine.prototype.close = function() {};
/**
* @param {(string|Buffer)} data
* @param {readline.Key=} key
* @return {void}
*/
readline.ReadLine.prototype.write = function(data, key) {};
/**
* @interface
* @type {((function(string): readline.CompleterResult)|(function(string, (function(*, readline.CompleterResult): void)): *))}
*/
readline.Completer = function() {};
/**
* @interface
*/
readline.CompleterResult = function() {};
/**
* @type {Array<string>}
*/
readline.CompleterResult.prototype.completions;
/**
* @type {string}
*/
readline.CompleterResult.prototype.line;
/**
* @interface
*/
readline.ReadLineOptions = function() {};
/**
* @type {NodeJS.ReadableStream}
*/
readline.ReadLineOptions.prototype.input;
/**
* @type {NodeJS.WritableStream}
*/
readline.ReadLineOptions.prototype.output;
/**
* @type {readline.Completer}
*/
readline.ReadLineOptions.prototype.completer;
/**
* @type {boolean}
*/
readline.ReadLineOptions.prototype.terminal;
/**
* @type {number}
*/
readline.ReadLineOptions.prototype.historySize;
/**
* @param {NodeJS.ReadableStream} input
* @param {NodeJS.WritableStream=} output
* @param {readline.Completer=} completer
* @param {boolean=} terminal
* @return {readline.ReadLine}
*/
readline.createInterface = function(input, output, completer, terminal) {};
/**
* @param {readline.ReadLineOptions} options
* @return {readline.ReadLine}
*/
readline.createInterface = function(options) {};
/**
* @param {NodeJS.WritableStream} stream
* @param {number} x
* @param {number} y
* @return {void}
*/
readline.cursorTo = function(stream, x, y) {};
/**
* @param {NodeJS.WritableStream} stream
* @param {(number|string)} dx
* @param {(number|string)} dy
* @return {void}
*/
readline.moveCursor = function(stream, dx, dy) {};
/**
* @param {NodeJS.WritableStream} stream
* @param {number} dir
* @return {void}
*/
readline.clearLine = function(stream, dir) {};
/**
* @param {NodeJS.WritableStream} stream
* @return {void}
*/
readline.clearScreenDown = function(stream) {};
module.exports.Key = readline.Key;
module.exports.ReadLine = readline.ReadLine;
module.exports.Completer = readline.Completer;
module.exports.CompleterResult = readline.CompleterResult;
module.exports.ReadLineOptions = readline.ReadLineOptions;
module.exports.createInterface = readline.createInterface;
module.exports.createInterface = readline.createInterface;
module.exports.cursorTo = readline.cursorTo;
module.exports.moveCursor = readline.moveCursor;
module.exports.clearLine = readline.clearLine;
module.exports.clearScreenDown = readline.clearScreenDown;
/**
* @interface
* @extends {readline.ReadLine}
*/
readline.Interface = function() {};
module.exports.Interface = readline.Interface;

View File

@@ -0,0 +1,149 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "repl"
*/
var repl = {};
var readline = require("readline");
/**
* @interface
*/
repl.ReplOptions = function() {};
/**
* @type {string}
*/
repl.ReplOptions.prototype.prompt;
/**
* @type {NodeJS.ReadableStream}
*/
repl.ReplOptions.prototype.input;
/**
* @type {NodeJS.WritableStream}
*/
repl.ReplOptions.prototype.output;
/**
* @type {boolean}
*/
repl.ReplOptions.prototype.terminal;
/**
* @type {Function}
*/
repl.ReplOptions.prototype.eval;
/**
* @type {boolean}
*/
repl.ReplOptions.prototype.useColors;
/**
* @type {boolean}
*/
repl.ReplOptions.prototype.useGlobal;
/**
* @type {boolean}
*/
repl.ReplOptions.prototype.ignoreUndefined;
/**
* @type {Function}
*/
repl.ReplOptions.prototype.writer;
/**
* @type {Function}
*/
repl.ReplOptions.prototype.completer;
/**
* @type {*}
*/
repl.ReplOptions.prototype.replMode;
/**
* @type {*}
*/
repl.ReplOptions.prototype.breakEvalOnSigint;
/**
* @interface
* @extends {readline.ReadLine}
*/
repl.REPLServer = function() {};
/**
* @param {string} keyword
* @param {(Function|{help: string, action: Function})} cmd
* @return {void}
*/
repl.REPLServer.prototype.defineCommand = function(keyword, cmd) {};
/**
* @param {boolean=} preserveCursor
* @return {void}
*/
repl.REPLServer.prototype.displayPrompt = function(preserveCursor) {};
/**
* @param {repl.ReplOptions} options
* @return {repl.REPLServer}
*/
repl.start = function(options) {};
module.exports.ReplOptions = repl.ReplOptions;
module.exports.REPLServer = repl.REPLServer;
module.exports.start = repl.start;
/**
* @interface
*/
repl.REPLServer = function() {};
repl.REPLServer.prototype.context;
module.exports.REPLServer = repl.REPLServer;

View File

@@ -0,0 +1,879 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "stream"
*/
var events = require("events");
/**
* @constructor
* @extends {events.EventEmitter}
*/
function internal() {}
/**
* @template T
* @param {T} destination
* @param {{end: boolean}=} options
* @return {T}
*/
internal.prototype.pipe = function(destination, options) {};
var internal = internal || {};
/**
* @constructor
* @extends {internal}
*/
internal.Stream;
/**
* @interface
*/
internal.ReadableOptions = function() {};
/**
* @type {number}
*/
internal.ReadableOptions.prototype.highWaterMark;
/**
* @type {string}
*/
internal.ReadableOptions.prototype.encoding;
/**
* @type {boolean}
*/
internal.ReadableOptions.prototype.objectMode;
/**
* @type {(function(number=): *)}
*/
internal.ReadableOptions.prototype.read;
/**
* @param {internal.ReadableOptions=} opts
* @return {internal.Readable}
* @constructor
*/
internal.Readable = function(opts) {};
/**
* @type {boolean}
*/
internal.Readable.prototype.readable;
/**
* @param {number} size
* @return {void}
*/
internal.Readable.prototype._read = function(size) {};
/**
* @param {number=} size
* @return {*}
*/
internal.Readable.prototype.read = function(size) {};
/**
* @param {string} encoding
* @return {void}
*/
internal.Readable.prototype.setEncoding = function(encoding) {};
/**
* @return {internal.Readable}
*/
internal.Readable.prototype.pause = function() {};
/**
* @return {internal.Readable}
*/
internal.Readable.prototype.resume = function() {};
/**
* @template T
* @param {T} destination
* @param {{end: boolean}=} options
* @return {T}
*/
internal.Readable.prototype.pipe = function(destination, options) {};
/**
* @template T
* @param {T=} destination
* @return {void}
*/
internal.Readable.prototype.unpipe = function(destination) {};
/**
* @param {*} chunk
* @return {void}
*/
internal.Readable.prototype.unshift = function(chunk) {};
/**
* @param {NodeJS.ReadableStream} oldStream
* @return {NodeJS.ReadableStream}
*/
internal.Readable.prototype.wrap = function(oldStream) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @return {boolean}
*/
internal.Readable.prototype.push = function(chunk, encoding) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {...*} args
* @return {boolean}
*/
internal.Readable.prototype.emit = function(event, args) {};
/**
* @param {string} event
* @return {boolean}
*/
internal.Readable.prototype.emit = function(event) {};
/**
* @param {string} event
* @param {(Buffer|string)} chunk
* @return {boolean}
*/
internal.Readable.prototype.emit = function(event, chunk) {};
/**
* @param {string} event
* @param {Error} err
* @return {boolean}
*/
internal.Readable.prototype.emit = function(event, err) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Readable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Readable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function((Buffer|string)): void)} listener
* @return {*}
*/
internal.Readable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Readable.prototype.removeListener = function(event, listener) {};
/**
* @interface
*/
internal.WritableOptions = function() {};
/**
* @type {number}
*/
internal.WritableOptions.prototype.highWaterMark;
/**
* @type {boolean}
*/
internal.WritableOptions.prototype.decodeStrings;
/**
* @type {boolean}
*/
internal.WritableOptions.prototype.objectMode;
/**
* @type {(function((string|Buffer), string, Function): *)}
*/
internal.WritableOptions.prototype.write;
/**
* @type {(function(Array<{chunk: (string|Buffer), encoding: string}>, Function): *)}
*/
internal.WritableOptions.prototype.writev;
/**
* @param {internal.WritableOptions=} opts
* @return {internal.Writable}
* @constructor
*/
internal.Writable = function(opts) {};
/**
* @type {boolean}
*/
internal.Writable.prototype.writable;
/**
* @param {*} chunk
* @param {string} encoding
* @param {Function} callback
* @return {void}
*/
internal.Writable.prototype._write = function(chunk, encoding, callback) {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {boolean}
*/
internal.Writable.prototype.write = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
internal.Writable.prototype.write = function(chunk, encoding, cb) {};
/**
* @return {void}
*/
internal.Writable.prototype.end = function() {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {void}
*/
internal.Writable.prototype.end = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
internal.Writable.prototype.end = function(chunk, encoding, cb) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.addListener = function(event, listener) {};
/**
* @param {string} event
* @param {...*} args
* @return {boolean}
*/
internal.Writable.prototype.emit = function(event, args) {};
/**
* @param {string} event
* @return {boolean}
*/
internal.Writable.prototype.emit = function(event) {};
/**
* @param {string} event
* @param {(Buffer|string)} chunk
* @return {boolean}
*/
internal.Writable.prototype.emit = function(event, chunk) {};
/**
* @param {string} event
* @param {Error} err
* @return {boolean}
*/
internal.Writable.prototype.emit = function(event, err) {};
/**
* @param {string} event
* @param {internal.Readable} src
* @return {boolean}
*/
internal.Writable.prototype.emit = function(event, src) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.on = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.once = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.prependOnceListener = function(event, listener) {};
/**
* @param {string} event
* @param {Function} listener
* @return {*}
*/
internal.Writable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(): void)} listener
* @return {*}
*/
internal.Writable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(Error): void)} listener
* @return {*}
*/
internal.Writable.prototype.removeListener = function(event, listener) {};
/**
* @param {string} event
* @param {(function(internal.Readable): void)} listener
* @return {*}
*/
internal.Writable.prototype.removeListener = function(event, listener) {};
/**
* @interface
* @extends {internal.ReadableOptions}
* @extends {internal.WritableOptions}
*/
internal.DuplexOptions = function() {};
/**
* @type {boolean}
*/
internal.DuplexOptions.prototype.allowHalfOpen;
/**
* @type {boolean}
*/
internal.DuplexOptions.prototype.readableObjectMode;
/**
* @type {boolean}
*/
internal.DuplexOptions.prototype.writableObjectMode;
/**
* @param {internal.DuplexOptions=} opts
* @return {internal.Duplex}
* @constructor
*/
internal.Duplex = function(opts) {};
/**
* @return {internal.Duplex}
*/
internal.Duplex.prototype.pause = function() {};
/**
* @return {internal.Duplex}
*/
internal.Duplex.prototype.resume = function() {};
/**
* @type {boolean}
*/
internal.Duplex.prototype.writable;
/**
* @param {*} chunk
* @param {string} encoding
* @param {Function} callback
* @return {void}
*/
internal.Duplex.prototype._write = function(chunk, encoding, callback) {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {boolean}
*/
internal.Duplex.prototype.write = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
internal.Duplex.prototype.write = function(chunk, encoding, cb) {};
/**
* @return {void}
*/
internal.Duplex.prototype.end = function() {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {void}
*/
internal.Duplex.prototype.end = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
internal.Duplex.prototype.end = function(chunk, encoding, cb) {};
/**
* @interface
* @extends {internal.ReadableOptions}
* @extends {internal.WritableOptions}
*/
internal.TransformOptions = function() {};
/**
* @type {(function((string|Buffer), string, Function): *)}
*/
internal.TransformOptions.prototype.transform;
/**
* @type {(function(Function): *)}
*/
internal.TransformOptions.prototype.flush;
/**
* @param {internal.TransformOptions=} opts
* @return {internal.Transform}
* @constructor
*/
internal.Transform = function(opts) {};
/**
* @type {boolean}
*/
internal.Transform.prototype.readable;
/**
* @type {boolean}
*/
internal.Transform.prototype.writable;
/**
* @param {*} chunk
* @param {string} encoding
* @param {Function} callback
* @return {void}
*/
internal.Transform.prototype._transform = function(chunk, encoding, callback) {};
/**
* @param {Function} callback
* @return {void}
*/
internal.Transform.prototype._flush = function(callback) {};
/**
* @param {number=} size
* @return {*}
*/
internal.Transform.prototype.read = function(size) {};
/**
* @param {string} encoding
* @return {void}
*/
internal.Transform.prototype.setEncoding = function(encoding) {};
/**
* @return {internal.Transform}
*/
internal.Transform.prototype.pause = function() {};
/**
* @return {internal.Transform}
*/
internal.Transform.prototype.resume = function() {};
/**
* @template T
* @param {T} destination
* @param {{end: boolean}=} options
* @return {T}
*/
internal.Transform.prototype.pipe = function(destination, options) {};
/**
* @template T
* @param {T=} destination
* @return {void}
*/
internal.Transform.prototype.unpipe = function(destination) {};
/**
* @param {*} chunk
* @return {void}
*/
internal.Transform.prototype.unshift = function(chunk) {};
/**
* @param {NodeJS.ReadableStream} oldStream
* @return {NodeJS.ReadableStream}
*/
internal.Transform.prototype.wrap = function(oldStream) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @return {boolean}
*/
internal.Transform.prototype.push = function(chunk, encoding) {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {boolean}
*/
internal.Transform.prototype.write = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {boolean}
*/
internal.Transform.prototype.write = function(chunk, encoding, cb) {};
/**
* @return {void}
*/
internal.Transform.prototype.end = function() {};
/**
* @param {*} chunk
* @param {Function=} cb
* @return {void}
*/
internal.Transform.prototype.end = function(chunk, cb) {};
/**
* @param {*} chunk
* @param {string=} encoding
* @param {Function=} cb
* @return {void}
*/
internal.Transform.prototype.end = function(chunk, encoding, cb) {};
/**
* @constructor
* @extends {internal.Transform}
*/
internal.PassThrough;
module.exports = internal;

View File

@@ -0,0 +1,80 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "string_decoder"
*/
var string_decoder = {};
/**
* @interface
*/
string_decoder.NodeStringDecoder = function() {};
/**
* @param {Buffer} buffer
* @return {string}
*/
string_decoder.NodeStringDecoder.prototype.write = function(buffer) {};
/**
* @param {Buffer=} buffer
* @return {string}
*/
string_decoder.NodeStringDecoder.prototype.end = function(buffer) {};
/**
* @type {(function(new: string_decoder.NodeStringDecoder, string=))}
*/
string_decoder.StringDecoder;
module.exports.NodeStringDecoder = string_decoder.NodeStringDecoder;
module.exports.StringDecoder = string_decoder.StringDecoder;
/**
* @interface
*/
string_decoder.NodeStringDecoder = function() {};
/**
* @param {Buffer} buffer
* @return {number}
*/
string_decoder.NodeStringDecoder.prototype.detectIncompleteChar = function(buffer) {};
module.exports.NodeStringDecoder = string_decoder.NodeStringDecoder;

View File

@@ -0,0 +1,43 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "sys"
*/
var util = require("util");
module.exports = util;

View File

@@ -0,0 +1,127 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "timers"
*/
var timers = {};
/**
* @param {(function(...*): void)} callback
* @param {number} ms
* @param {...*} args
* @return {NodeJS.Timer}
*/
timers.setTimeout = function(callback, ms, args) {};
/**
* @param {NodeJS.Timer} timeoutId
* @return {void}
*/
timers.clearTimeout = function(timeoutId) {};
/**
* @param {(function(...*): void)} callback
* @param {number} ms
* @param {...*} args
* @return {NodeJS.Timer}
*/
timers.setInterval = function(callback, ms, args) {};
/**
* @param {NodeJS.Timer} intervalId
* @return {void}
*/
timers.clearInterval = function(intervalId) {};
/**
* @param {(function(...*): void)} callback
* @param {...*} args
* @return {*}
*/
timers.setImmediate = function(callback, args) {};
/**
* @param {*} immediateId
* @return {void}
*/
timers.clearImmediate = function(immediateId) {};
module.exports.setTimeout = timers.setTimeout;
module.exports.clearTimeout = timers.clearTimeout;
module.exports.setInterval = timers.setInterval;
module.exports.clearInterval = timers.clearInterval;
module.exports.setImmediate = timers.setImmediate;
module.exports.clearImmediate = timers.clearImmediate;
/**
* @param {NodeJS.Timer} item
* @return {*}
*/
timers.active = function(item) {};
/**
* @param {NodeJS.Timer} item
* @return {*}
*/
timers._unrefActive = function(item) {};
/**
* @param {NodeJS.Timer} item
* @return {*}
*/
timers.unenroll = function(item) {};
/**
* @param {NodeJS.Timer} item
* @param {number} msecs
* @return {*}
*/
timers.enroll = function(item, msecs) {};
module.exports.active = timers.active;
module.exports._unrefActive = timers._unrefActive;
module.exports.unenroll = timers.unenroll;
module.exports.enroll = timers.enroll;

View File

@@ -0,0 +1,646 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "tls"
*/
var tls = {};
var crypto = require("crypto");
var net = require("net");
/**
* @type {number}
*/
var CLIENT_RENEG_LIMIT;
/**
* @type {number}
*/
var CLIENT_RENEG_WINDOW;
/**
* @interface
*/
tls.Certificate = function() {};
/**
* @type {string}
*/
tls.Certificate.prototype.C;
/**
* @type {string}
*/
tls.Certificate.prototype.ST;
/**
* @type {string}
*/
tls.Certificate.prototype.L;
/**
* @type {string}
*/
tls.Certificate.prototype.O;
/**
* @type {string}
*/
tls.Certificate.prototype.OU;
/**
* @type {string}
*/
tls.Certificate.prototype.CN;
/**
* @interface
*/
tls.CipherNameAndProtocol = function() {};
/**
* @type {string}
*/
tls.CipherNameAndProtocol.prototype.name;
/**
* @type {string}
*/
tls.CipherNameAndProtocol.prototype.version;
/**
* @constructor
* @extends {internal.Duplex}
*/
tls.TLSSocket;
/**
* @return {{port: number, family: string, address: string}}
*/
tls.TLSSocket.prototype.address = function() {};
/**
* @type {boolean}
*/
tls.TLSSocket.prototype.authorized;
/**
* @type {Error}
*/
tls.TLSSocket.prototype.authorizationError;
/**
* @type {boolean}
*/
tls.TLSSocket.prototype.encrypted;
/**
* @return {tls.CipherNameAndProtocol}
*/
tls.TLSSocket.prototype.getCipher = function() {};
/**
* @param {boolean=} detailed
* @return {{subject: tls.Certificate, issuerInfo: tls.Certificate, issuer: tls.Certificate, raw: *, valid_from: string, valid_to: string, fingerprint: string, serialNumber: string}}
*/
tls.TLSSocket.prototype.getPeerCertificate = function(detailed) {};
/**
* @return {*}
*/
tls.TLSSocket.prototype.getSession = function() {};
/**
* @return {*}
*/
tls.TLSSocket.prototype.getTLSTicket = function() {};
/**
* @type {string}
*/
tls.TLSSocket.prototype.localAddress;
/**
* @type {string}
*/
tls.TLSSocket.prototype.localPort;
/**
* @type {string}
*/
tls.TLSSocket.prototype.remoteAddress;
/**
* @type {string}
*/
tls.TLSSocket.prototype.remoteFamily;
/**
* @type {number}
*/
tls.TLSSocket.prototype.remotePort;
/**
* @param {tls.TlsOptions} options
* @param {(function(Error): *)} callback
* @return {*}
*/
tls.TLSSocket.prototype.renegotiate = function(options, callback) {};
/**
* @param {number} size
* @return {boolean}
*/
tls.TLSSocket.prototype.setMaxSendFragment = function(size) {};
/**
* @interface
*/
tls.TlsOptions = function() {};
/**
* @type {string}
*/
tls.TlsOptions.prototype.host;
/**
* @type {number}
*/
tls.TlsOptions.prototype.port;
/**
* @type {(string|Array<Buffer>)}
*/
tls.TlsOptions.prototype.pfx;
/**
* @type {(string|Array<string>|Buffer|Array<*>)}
*/
tls.TlsOptions.prototype.key;
/**
* @type {string}
*/
tls.TlsOptions.prototype.passphrase;
/**
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
*/
tls.TlsOptions.prototype.cert;
/**
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
*/
tls.TlsOptions.prototype.ca;
/**
* @type {(string|Array<string>)}
*/
tls.TlsOptions.prototype.crl;
/**
* @type {string}
*/
tls.TlsOptions.prototype.ciphers;
/**
* @type {boolean}
*/
tls.TlsOptions.prototype.honorCipherOrder;
/**
* @type {boolean}
*/
tls.TlsOptions.prototype.requestCert;
/**
* @type {boolean}
*/
tls.TlsOptions.prototype.rejectUnauthorized;
/**
* @type {(Array<string>|Buffer)}
*/
tls.TlsOptions.prototype.NPNProtocols;
/**
* @type {(function(string, (function(Error, tls.SecureContext): *)): *)}
*/
tls.TlsOptions.prototype.SNICallback;
/**
* @type {string}
*/
tls.TlsOptions.prototype.ecdhCurve;
/**
* @type {(string|Buffer)}
*/
tls.TlsOptions.prototype.dhparam;
/**
* @type {number}
*/
tls.TlsOptions.prototype.handshakeTimeout;
/**
* @type {(Array<string>|Buffer)}
*/
tls.TlsOptions.prototype.ALPNProtocols;
/**
* @type {number}
*/
tls.TlsOptions.prototype.sessionTimeout;
/**
* @type {*}
*/
tls.TlsOptions.prototype.ticketKeys;
/**
* @type {string}
*/
tls.TlsOptions.prototype.sessionIdContext;
/**
* @type {string}
*/
tls.TlsOptions.prototype.secureProtocol;
/**
* @interface
*/
tls.ConnectionOptions = function() {};
/**
* @type {string}
*/
tls.ConnectionOptions.prototype.host;
/**
* @type {number}
*/
tls.ConnectionOptions.prototype.port;
/**
* @type {net.Socket}
*/
tls.ConnectionOptions.prototype.socket;
/**
* @type {(string|Buffer)}
*/
tls.ConnectionOptions.prototype.pfx;
/**
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
*/
tls.ConnectionOptions.prototype.key;
/**
* @type {string}
*/
tls.ConnectionOptions.prototype.passphrase;
/**
* @type {(string|Array<string>|Buffer|Array<Buffer>)}
*/
tls.ConnectionOptions.prototype.cert;
/**
* @type {(string|Buffer|Array<(string|Buffer)>)}
*/
tls.ConnectionOptions.prototype.ca;
/**
* @type {boolean}
*/
tls.ConnectionOptions.prototype.rejectUnauthorized;
/**
* @type {Array<(string|Buffer)>}
*/
tls.ConnectionOptions.prototype.NPNProtocols;
/**
* @type {string}
*/
tls.ConnectionOptions.prototype.servername;
/**
* @type {string}
*/
tls.ConnectionOptions.prototype.path;
/**
* @type {Array<(string|Buffer)>}
*/
tls.ConnectionOptions.prototype.ALPNProtocols;
/**
* @type {(function(string, (string|Buffer|Array<(string|Buffer)>)): *)}
*/
tls.ConnectionOptions.prototype.checkServerIdentity;
/**
* @type {string}
*/
tls.ConnectionOptions.prototype.secureProtocol;
/**
* @type {Object}
*/
tls.ConnectionOptions.prototype.secureContext;
/**
* @type {Buffer}
*/
tls.ConnectionOptions.prototype.session;
/**
* @type {number}
*/
tls.ConnectionOptions.prototype.minDHSize;
/**
* @interface
* @extends {net.Server}
*/
tls.Server = function() {};
/**
* @return {tls.Server}
*/
tls.Server.prototype.close = function() {};
/**
* @return {{port: number, family: string, address: string}}
*/
tls.Server.prototype.address = function() {};
/**
* @param {string} hostName
* @param {{key: string, cert: string, ca: string}} credentials
* @return {void}
*/
tls.Server.prototype.addContext = function(hostName, credentials) {};
/**
* @type {number}
*/
tls.Server.prototype.maxConnections;
/**
* @type {number}
*/
tls.Server.prototype.connections;
/**
* @interface
* @extends {internal.Duplex}
*/
tls.ClearTextStream = function() {};
/**
* @type {boolean}
*/
tls.ClearTextStream.prototype.authorized;
/**
* @type {Error}
*/
tls.ClearTextStream.prototype.authorizationError;
/**
* @return {*}
*/
tls.ClearTextStream.prototype.getPeerCertificate = function() {};
tls.ClearTextStream.prototype.getCipher;
/**
* @type {string}
*/
tls.ClearTextStream.prototype.getCipher.name;
/**
* @type {string}
*/
tls.ClearTextStream.prototype.getCipher.version;
tls.ClearTextStream.prototype.address;
/**
* @type {number}
*/
tls.ClearTextStream.prototype.address.port;
/**
* @type {string}
*/
tls.ClearTextStream.prototype.address.family;
/**
* @type {string}
*/
tls.ClearTextStream.prototype.address.address;
/**
* @type {string}
*/
tls.ClearTextStream.prototype.remoteAddress;
/**
* @type {number}
*/
tls.ClearTextStream.prototype.remotePort;
/**
* @interface
*/
tls.SecurePair = function() {};
/**
* @type {*}
*/
tls.SecurePair.prototype.encrypted;
/**
* @type {*}
*/
tls.SecurePair.prototype.cleartext;
/**
* @interface
*/
tls.SecureContextOptions = function() {};
/**
* @type {(string|Buffer)}
*/
tls.SecureContextOptions.prototype.pfx;
/**
* @type {(string|Buffer)}
*/
tls.SecureContextOptions.prototype.key;
/**
* @type {string}
*/
tls.SecureContextOptions.prototype.passphrase;
/**
* @type {(string|Buffer)}
*/
tls.SecureContextOptions.prototype.cert;
/**
* @type {(string|Buffer)}
*/
tls.SecureContextOptions.prototype.ca;
/**
* @type {(string|Array<string>)}
*/
tls.SecureContextOptions.prototype.crl;
/**
* @type {string}
*/
tls.SecureContextOptions.prototype.ciphers;
/**
* @type {boolean}
*/
tls.SecureContextOptions.prototype.honorCipherOrder;
/**
* @interface
*/
tls.SecureContext = function() {};
/**
* @type {*}
*/
tls.SecureContext.prototype.context;
/**
* @param {tls.TlsOptions} options
* @param {(function(tls.ClearTextStream): void)=} secureConnectionListener
* @return {tls.Server}
*/
tls.createServer = function(options, secureConnectionListener) {};
/**
* @param {tls.ConnectionOptions} options
* @param {(function(): void)=} secureConnectionListener
* @return {tls.ClearTextStream}
*/
tls.connect = function(options, secureConnectionListener) {};
/**
* @param {number} port
* @param {string=} host
* @param {tls.ConnectionOptions=} options
* @param {(function(): void)=} secureConnectListener
* @return {tls.ClearTextStream}
*/
tls.connect = function(port, host, options, secureConnectListener) {};
/**
* @param {number} port
* @param {tls.ConnectionOptions=} options
* @param {(function(): void)=} secureConnectListener
* @return {tls.ClearTextStream}
*/
tls.connect = function(port, options, secureConnectListener) {};
/**
* @param {crypto.Credentials=} credentials
* @param {boolean=} isServer
* @param {boolean=} requestCert
* @param {boolean=} rejectUnauthorized
* @return {tls.SecurePair}
*/
tls.createSecurePair = function(credentials, isServer, requestCert, rejectUnauthorized) {};
/**
* @param {tls.SecureContextOptions} details
* @return {tls.SecureContext}
*/
tls.createSecureContext = function(details) {};
module.exports.Certificate = tls.Certificate;
module.exports.CipherNameAndProtocol = tls.CipherNameAndProtocol;
module.exports.TLSSocket = tls.TLSSocket;
module.exports.TlsOptions = tls.TlsOptions;
module.exports.ConnectionOptions = tls.ConnectionOptions;
module.exports.Server = tls.Server;
module.exports.ClearTextStream = tls.ClearTextStream;
module.exports.SecurePair = tls.SecurePair;
module.exports.SecureContextOptions = tls.SecureContextOptions;
module.exports.SecureContext = tls.SecureContext;
module.exports.createServer = tls.createServer;
module.exports.connect = tls.connect;
module.exports.connect = tls.connect;
module.exports.connect = tls.connect;
module.exports.createSecurePair = tls.createSecurePair;
module.exports.createSecureContext = tls.createSecureContext;
module.exports.CLIENT_RENEG_WINDOW = CLIENT_RENEG_WINDOW;
module.exports.CLIENT_RENEG_LIMIT = CLIENT_RENEG_LIMIT;

View File

@@ -0,0 +1,133 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "tty"
*/
var tty = {};
var net = require("net");
/**
* @param {number} fd
* @return {boolean}
*/
tty.isatty = function(fd) {};
/**
* @interface
* @extends {net.Socket}
*/
tty.ReadStream = function() {};
/**
* @type {boolean}
*/
tty.ReadStream.prototype.isRaw;
/**
* @param {boolean} mode
* @return {void}
*/
tty.ReadStream.prototype.setRawMode = function(mode) {};
/**
* @type {boolean}
*/
tty.ReadStream.prototype.isTTY;
/**
* @interface
* @extends {net.Socket}
*/
tty.WriteStream = function() {};
/**
* @type {number}
*/
tty.WriteStream.prototype.columns;
/**
* @type {number}
*/
tty.WriteStream.prototype.rows;
/**
* @type {boolean}
*/
tty.WriteStream.prototype.isTTY;
module.exports.isatty = tty.isatty;
module.exports.ReadStream = tty.ReadStream;
module.exports.WriteStream = tty.WriteStream;
/**
* @param {boolean} mode
* @return {void}
*/
tty.setRawMode = function(mode) {};
/**
* @param {string} path
* @param {Array<string>=} args
* @return {Array<*>}
*/
tty.open = function(path, args) {};
/**
* @param {*} fd
* @param {number} row
* @param {number} col
* @return {*}
*/
tty.setWindowSize = function(fd, row, col) {};
/**
* @param {*} fd
* @return {Array<number>}
*/
tty.getWindowSize = function(fd) {};
module.exports.setRawMode = tty.setRawMode;
module.exports.open = tty.open;
module.exports.setWindowSize = tty.setWindowSize;
module.exports.getWindowSize = tty.getWindowSize;

View File

@@ -0,0 +1,135 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "url"
*/
var url = {};
/**
* @interface
*/
url.Url = function() {};
/**
* @type {string}
*/
url.Url.prototype.href;
/**
* @type {string}
*/
url.Url.prototype.protocol;
/**
* @type {string}
*/
url.Url.prototype.auth;
/**
* @type {string}
*/
url.Url.prototype.hostname;
/**
* @type {string}
*/
url.Url.prototype.port;
/**
* @type {string}
*/
url.Url.prototype.host;
/**
* @type {string}
*/
url.Url.prototype.pathname;
/**
* @type {string}
*/
url.Url.prototype.search;
/**
* @type {*}
*/
url.Url.prototype.query;
/**
* @type {boolean}
*/
url.Url.prototype.slashes;
/**
* @type {string}
*/
url.Url.prototype.hash;
/**
* @type {string}
*/
url.Url.prototype.path;
/**
* @param {string} urlStr
* @param {boolean=} parseQueryString
* @param {boolean=} slashesDenoteHost
* @return {url.Url}
*/
url.parse = function(urlStr, parseQueryString, slashesDenoteHost) {};
/**
* @param {url.Url} url
* @return {string}
*/
url.format = function(url) {};
/**
* @param {string} from
* @param {string} to
* @return {string}
*/
url.resolve = function(from, to) {};
module.exports.Url = url.Url;
module.exports.parse = url.parse;
module.exports.format = url.format;
module.exports.resolve = url.resolve;

View File

@@ -0,0 +1,292 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "util"
*/
var util = {};
/**
* @interface
*/
util.InspectOptions = function() {};
/**
* @type {boolean}
*/
util.InspectOptions.prototype.showHidden;
/**
* @type {number}
*/
util.InspectOptions.prototype.depth;
/**
* @type {boolean}
*/
util.InspectOptions.prototype.colors;
/**
* @type {boolean}
*/
util.InspectOptions.prototype.customInspect;
/**
* @param {*} format
* @param {...*} param
* @return {string}
*/
util.format = function(format, param) {};
/**
* @param {string} string
* @return {void}
*/
util.debug = function(string) {};
/**
* @param {...*} param
* @return {void}
*/
util.error = function(param) {};
/**
* @param {...*} param
* @return {void}
*/
util.puts = function(param) {};
/**
* @param {...*} param
* @return {void}
*/
util.print = function(param) {};
/**
* @param {string} string
* @return {void}
*/
util.log = function(string) {};
/**
* @param {*} object
* @param {boolean=} showHidden
* @param {number=} depth
* @param {boolean=} color
* @return {string}
*/
util.inspect = function(object, showHidden, depth, color) {};
/**
* @param {*} object
* @param {util.InspectOptions} options
* @return {string}
*/
util.inspect = function(object, options) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isArray = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isRegExp = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isDate = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isError = function(object) {};
/**
* @param {*} constructor
* @param {*} superConstructor
* @return {void}
*/
util.inherits = function(constructor, superConstructor) {};
/**
* @param {string} key
* @return {(function(string, ...*): void)}
*/
util.debuglog = function(key) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isBoolean = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isBuffer = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isFunction = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isNull = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isNullOrUndefined = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isNumber = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isObject = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isPrimitive = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isString = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isSymbol = function(object) {};
/**
* @param {*} object
* @return {boolean}
*/
util.isUndefined = function(object) {};
/**
* @param {Function} fn
* @param {string} message
* @return {Function}
*/
util.deprecate = function(fn, message) {};
module.exports.InspectOptions = util.InspectOptions;
module.exports.format = util.format;
module.exports.debug = util.debug;
module.exports.error = util.error;
module.exports.puts = util.puts;
module.exports.print = util.print;
module.exports.log = util.log;
module.exports.inspect = util.inspect;
module.exports.inspect = util.inspect;
module.exports.isArray = util.isArray;
module.exports.isRegExp = util.isRegExp;
module.exports.isDate = util.isDate;
module.exports.isError = util.isError;
module.exports.inherits = util.inherits;
module.exports.debuglog = util.debuglog;
module.exports.isBoolean = util.isBoolean;
module.exports.isBuffer = util.isBuffer;
module.exports.isFunction = util.isFunction;
module.exports.isNull = util.isNull;
module.exports.isNullOrUndefined = util.isNullOrUndefined;
module.exports.isNumber = util.isNumber;
module.exports.isObject = util.isObject;
module.exports.isPrimitive = util.isPrimitive;
module.exports.isString = util.isString;
module.exports.isSymbol = util.isSymbol;
module.exports.isUndefined = util.isUndefined;
module.exports.deprecate = util.deprecate;
/**
* @param {Object} destination
* @param {Object} source
* @return {Object}
*/
util._extend = function(destination, source) {};
module.exports._extend = util._extend;

View File

@@ -0,0 +1,93 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "v8"
*/
var v8 = {};
/**
* @interface
*/
function HeapSpaceInfo() {}
/**
* @type {string}
*/
HeapSpaceInfo.prototype.space_name;
/**
* @type {number}
*/
HeapSpaceInfo.prototype.space_size;
/**
* @type {number}
*/
HeapSpaceInfo.prototype.space_used_size;
/**
* @type {number}
*/
HeapSpaceInfo.prototype.space_available_size;
/**
* @type {number}
*/
HeapSpaceInfo.prototype.physical_space_size;
/**
* @return {{total_heap_size: number, total_heap_size_executable: number, total_physical_size: number, total_avaialble_size: number, used_heap_size: number, heap_size_limit: number}}
*/
v8.getHeapStatistics = function() {};
/**
* @return {Array<v8.HeapSpaceInfo>}
*/
v8.getHeapSpaceStatistics = function() {};
/**
* @param {string} flags
* @return {void}
*/
v8.setFlagsFromString = function(flags) {};
module.exports.getHeapStatistics = v8.getHeapStatistics;
module.exports.getHeapSpaceStatistics = v8.getHeapSpaceStatistics;
module.exports.setFlagsFromString = v8.setFlagsFromString;

View File

@@ -0,0 +1,214 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "vm"
*/
var vm = {};
/**
* @interface
*/
vm.Context = function() {};
/**
* @interface
*/
vm.ScriptOptions = function() {};
/**
* @type {string}
*/
vm.ScriptOptions.prototype.filename;
/**
* @type {number}
*/
vm.ScriptOptions.prototype.lineOffset;
/**
* @type {number}
*/
vm.ScriptOptions.prototype.columnOffset;
/**
* @type {boolean}
*/
vm.ScriptOptions.prototype.displayErrors;
/**
* @type {number}
*/
vm.ScriptOptions.prototype.timeout;
/**
* @type {Buffer}
*/
vm.ScriptOptions.prototype.cachedData;
/**
* @type {boolean}
*/
vm.ScriptOptions.prototype.produceCachedData;
/**
* @interface
*/
vm.RunningScriptOptions = function() {};
/**
* @type {string}
*/
vm.RunningScriptOptions.prototype.filename;
/**
* @type {number}
*/
vm.RunningScriptOptions.prototype.lineOffset;
/**
* @type {number}
*/
vm.RunningScriptOptions.prototype.columnOffset;
/**
* @type {boolean}
*/
vm.RunningScriptOptions.prototype.displayErrors;
/**
* @type {number}
*/
vm.RunningScriptOptions.prototype.timeout;
/**
* @param {string} code
* @param {vm.ScriptOptions=} options
* @return {vm.Script}
* @constructor
*/
vm.Script = function(code, options) {};
/**
* @param {vm.Context} contextifiedSandbox
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.Script.prototype.runInContext = function(contextifiedSandbox, options) {};
/**
* @param {vm.Context=} sandbox
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.Script.prototype.runInNewContext = function(sandbox, options) {};
/**
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.Script.prototype.runInThisContext = function(options) {};
/**
* @param {vm.Context=} sandbox
* @return {vm.Context}
*/
vm.createContext = function(sandbox) {};
/**
* @param {vm.Context} sandbox
* @return {boolean}
*/
vm.isContext = function(sandbox) {};
/**
* @param {string} code
* @param {vm.Context} contextifiedSandbox
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.runInContext = function(code, contextifiedSandbox, options) {};
/**
* @param {string} code
* @return {*}
*/
vm.runInDebugContext = function(code) {};
/**
* @param {string} code
* @param {vm.Context=} sandbox
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.runInNewContext = function(code, sandbox, options) {};
/**
* @param {string} code
* @param {vm.RunningScriptOptions=} options
* @return {*}
*/
vm.runInThisContext = function(code, options) {};
module.exports.Context = vm.Context;
module.exports.ScriptOptions = vm.ScriptOptions;
module.exports.RunningScriptOptions = vm.RunningScriptOptions;
module.exports.Script = vm.Script;
module.exports.createContext = vm.createContext;
module.exports.isContext = vm.isContext;
module.exports.runInContext = vm.runInContext;
module.exports.runInDebugContext = vm.runInDebugContext;
module.exports.runInNewContext = vm.runInNewContext;
module.exports.runInThisContext = vm.runInThisContext;
/**
* @param {string} code
* @param {string=} filename
* @return {vm.Script}
*/
vm.createScript = function(code, filename) {};
module.exports.createScript = vm.createScript;

View File

@@ -0,0 +1,533 @@
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// Parambir Singh <https://github.com/parambirs>
// Christian Vaagland Tellnes <https://github.com/tellnes>
// Wilco Bakker <https://github.com/WilcoBakker>
// Nicolas Voigt <https://github.com/octo-sniffle>
// Chigozirim C. <https://github.com/smac89>
// Flarna <https://github.com/Flarna>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// wwwy3y3 <https://github.com/wwwy3y3>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Kelvin Jin <https://github.com/kjin>
// Alvis HT Tang <https://github.com/alvis>
// Sebastian Silbermann <https://github.com/eps1lon>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Alberto Schiabel <https://github.com/jkomyno>
// Klaus Meinhardt <https://github.com/ajafff>
// Huw <https://github.com/hoo29>
// Nicolas Even <https://github.com/n-e>
// Bruno Scheufler <https://github.com/brunoscheufler>
// Mohsen Azimi <https://github.com/mohsen1>
// Hoàng Văn Khải <https://github.com/KSXGitHub>
// Alexander T. <https://github.com/a-tarasyuk>
// Lishude <https://github.com/islishude>
// Andrew Makarov <https://github.com/r3nya>
// Zane Hannan AU <https://github.com/ZaneHannanAU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @externs
* @fileoverview Definitions for module "zlib"
*/
var zlib = {};
/**
* @interface
*/
zlib.ZlibOptions = function() {};
/**
* @type {number}
*/
zlib.ZlibOptions.prototype.chunkSize;
/**
* @type {number}
*/
zlib.ZlibOptions.prototype.windowBits;
/**
* @type {number}
*/
zlib.ZlibOptions.prototype.level;
/**
* @type {number}
*/
zlib.ZlibOptions.prototype.memLevel;
/**
* @type {number}
*/
zlib.ZlibOptions.prototype.strategy;
/**
* @type {*}
*/
zlib.ZlibOptions.prototype.dictionary;
/**
* @interface
* @extends {internal.Transform}
*/
zlib.Gzip = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.Gunzip = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.Deflate = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.Inflate = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.DeflateRaw = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.InflateRaw = function() {};
/**
* @interface
* @extends {internal.Transform}
*/
zlib.Unzip = function() {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.Gzip}
*/
zlib.createGzip = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.Gunzip}
*/
zlib.createGunzip = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.Deflate}
*/
zlib.createDeflate = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.Inflate}
*/
zlib.createInflate = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.DeflateRaw}
*/
zlib.createDeflateRaw = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.InflateRaw}
*/
zlib.createInflateRaw = function(options) {};
/**
* @param {zlib.ZlibOptions=} options
* @return {zlib.Unzip}
*/
zlib.createUnzip = function(options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.deflate = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.deflateSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.deflateRaw = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.deflateRawSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.gzip = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.gzipSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.gunzip = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.gunzipSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.inflate = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.inflateSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.inflateRaw = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.inflateRawSync = function(buf, options) {};
/**
* @param {Buffer} buf
* @param {(function(Error, *): void)} callback
* @return {void}
*/
zlib.unzip = function(buf, callback) {};
/**
* @param {Buffer} buf
* @param {zlib.ZlibOptions=} options
* @return {*}
*/
zlib.unzipSync = function(buf, options) {};
/**
* @type {number}
*/
zlib.Z_NO_FLUSH;
/**
* @type {number}
*/
zlib.Z_PARTIAL_FLUSH;
/**
* @type {number}
*/
zlib.Z_SYNC_FLUSH;
/**
* @type {number}
*/
zlib.Z_FULL_FLUSH;
/**
* @type {number}
*/
zlib.Z_FINISH;
/**
* @type {number}
*/
zlib.Z_BLOCK;
/**
* @type {number}
*/
zlib.Z_TREES;
/**
* @type {number}
*/
zlib.Z_OK;
/**
* @type {number}
*/
zlib.Z_STREAM_END;
/**
* @type {number}
*/
zlib.Z_NEED_DICT;
/**
* @type {number}
*/
zlib.Z_ERRNO;
/**
* @type {number}
*/
zlib.Z_STREAM_ERROR;
/**
* @type {number}
*/
zlib.Z_DATA_ERROR;
/**
* @type {number}
*/
zlib.Z_MEM_ERROR;
/**
* @type {number}
*/
zlib.Z_BUF_ERROR;
/**
* @type {number}
*/
zlib.Z_VERSION_ERROR;
/**
* @type {number}
*/
zlib.Z_NO_COMPRESSION;
/**
* @type {number}
*/
zlib.Z_BEST_SPEED;
/**
* @type {number}
*/
zlib.Z_BEST_COMPRESSION;
/**
* @type {number}
*/
zlib.Z_DEFAULT_COMPRESSION;
/**
* @type {number}
*/
zlib.Z_FILTERED;
/**
* @type {number}
*/
zlib.Z_HUFFMAN_ONLY;
/**
* @type {number}
*/
zlib.Z_RLE;
/**
* @type {number}
*/
zlib.Z_FIXED;
/**
* @type {number}
*/
zlib.Z_DEFAULT_STRATEGY;
/**
* @type {number}
*/
zlib.Z_BINARY;
/**
* @type {number}
*/
zlib.Z_TEXT;
/**
* @type {number}
*/
zlib.Z_ASCII;
/**
* @type {number}
*/
zlib.Z_UNKNOWN;
/**
* @type {number}
*/
zlib.Z_DEFLATED;
/**
* @type {number}
*/
zlib.Z_NULL;
module.exports.ZlibOptions = zlib.ZlibOptions;
module.exports.Gzip = zlib.Gzip;
module.exports.Gunzip = zlib.Gunzip;
module.exports.Deflate = zlib.Deflate;
module.exports.Inflate = zlib.Inflate;
module.exports.DeflateRaw = zlib.DeflateRaw;
module.exports.InflateRaw = zlib.InflateRaw;
module.exports.Unzip = zlib.Unzip;
module.exports.createGzip = zlib.createGzip;
module.exports.createGunzip = zlib.createGunzip;
module.exports.createDeflate = zlib.createDeflate;
module.exports.createInflate = zlib.createInflate;
module.exports.createDeflateRaw = zlib.createDeflateRaw;
module.exports.createInflateRaw = zlib.createInflateRaw;
module.exports.createUnzip = zlib.createUnzip;
module.exports.deflate = zlib.deflate;
module.exports.deflateSync = zlib.deflateSync;
module.exports.deflateRaw = zlib.deflateRaw;
module.exports.deflateRawSync = zlib.deflateRawSync;
module.exports.gzip = zlib.gzip;
module.exports.gzipSync = zlib.gzipSync;
module.exports.gunzip = zlib.gunzip;
module.exports.gunzipSync = zlib.gunzipSync;
module.exports.inflate = zlib.inflate;
module.exports.inflateSync = zlib.inflateSync;
module.exports.inflateRaw = zlib.inflateRaw;
module.exports.inflateRawSync = zlib.inflateRawSync;
module.exports.unzip = zlib.unzip;
module.exports.unzipSync = zlib.unzipSync;
module.exports.Z_NO_FLUSH = zlib.Z_NO_FLUSH;
module.exports.Z_PARTIAL_FLUSH = zlib.Z_PARTIAL_FLUSH;
module.exports.Z_SYNC_FLUSH = zlib.Z_SYNC_FLUSH;
module.exports.Z_FULL_FLUSH = zlib.Z_FULL_FLUSH;
module.exports.Z_FINISH = zlib.Z_FINISH;
module.exports.Z_BLOCK = zlib.Z_BLOCK;
module.exports.Z_TREES = zlib.Z_TREES;
module.exports.Z_OK = zlib.Z_OK;
module.exports.Z_STREAM_END = zlib.Z_STREAM_END;
module.exports.Z_NEED_DICT = zlib.Z_NEED_DICT;
module.exports.Z_ERRNO = zlib.Z_ERRNO;
module.exports.Z_STREAM_ERROR = zlib.Z_STREAM_ERROR;
module.exports.Z_DATA_ERROR = zlib.Z_DATA_ERROR;
module.exports.Z_MEM_ERROR = zlib.Z_MEM_ERROR;
module.exports.Z_BUF_ERROR = zlib.Z_BUF_ERROR;
module.exports.Z_VERSION_ERROR = zlib.Z_VERSION_ERROR;
module.exports.Z_NO_COMPRESSION = zlib.Z_NO_COMPRESSION;
module.exports.Z_BEST_SPEED = zlib.Z_BEST_SPEED;
module.exports.Z_BEST_COMPRESSION = zlib.Z_BEST_COMPRESSION;
module.exports.Z_DEFAULT_COMPRESSION = zlib.Z_DEFAULT_COMPRESSION;
module.exports.Z_FILTERED = zlib.Z_FILTERED;
module.exports.Z_HUFFMAN_ONLY = zlib.Z_HUFFMAN_ONLY;
module.exports.Z_RLE = zlib.Z_RLE;
module.exports.Z_FIXED = zlib.Z_FIXED;
module.exports.Z_DEFAULT_STRATEGY = zlib.Z_DEFAULT_STRATEGY;
module.exports.Z_BINARY = zlib.Z_BINARY;
module.exports.Z_TEXT = zlib.Z_TEXT;
module.exports.Z_ASCII = zlib.Z_ASCII;
module.exports.Z_UNKNOWN = zlib.Z_UNKNOWN;
module.exports.Z_DEFLATED = zlib.Z_DEFLATED;
module.exports.Z_NULL = zlib.Z_NULL;

View File

@@ -0,0 +1,796 @@
/**
* @externs
* Sources:
* * https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell
* * https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Shell_global_objects
* * http://mxr.mozilla.org/mozilla-central/source/js/src/shell/js.cpp
*/
/**
* @type {Object}
*/
var environment;
/**
* @type {Array.<string>}
*/
var arguments;
/**
* @type {Array.<string>}
*/
var scriptArgs;
/**
* @constructor
* @param {string=} name
* @see https://developer.mozilla.org/en-US/docs/Archive/Mozilla/SpiderMonkey/File_object
*/
function File(name) {}
/**
* @type {File}
*/
File.input;
/**
* @type {File}
*/
File.output;
/**
* @type {File}
*/
File.error;
/**
* @type {File}
*/
File.currentDir;
/**
* @type {string}
*/
File.separator;
/**
* @type {number}
*/
File.prototype.number;
/**
* @type {File}
*/
File.prototype.parent;
/**
* @type {string}
*/
File.prototype.path;
/**
* @type {string}
*/
File.prototype.name;
/**
* @type {boolean}
*/
File.prototype.isDirectory;
/**
* @type {boolean}
*/
File.prototype.isFile;
/**
* @type {boolean}
*/
File.prototype.exists;
/**
* @type {boolean}
*/
File.prototype.canRead;
/**
* @type {boolean}
*/
File.prototype.canWrite;
/**
* @type {boolean}
*/
File.prototype.canAppend;
/**
* @type {boolean}
*/
File.prototype.canReplace;
/**
* @type {boolean}
*/
File.prototype.isOpen;
/**
* @type {string}
*/
File.prototype.type;
/**
* @type {string}
*/
File.prototype.mode;
/**
* @type {Date}
*/
File.prototype.creationTime;
/**
* @type {Date}
*/
File.prototype.lastModified;
/**
* @type {number}
*/
File.prototype.size;
/**
* @type {boolean}
*/
File.prototype.hasRandomAccess;
/**
* @type {boolean}
*/
File.prototype.hasAutoFlush;
/**
* @type {number}
*/
File.prototype.position;
/**
* @type {boolean}
*/
File.prototype.isNative;
/**
* @param {string} mode
* @param {string} type
*/
File.prototype.open = function(mode, type) {};
/**
*/
File.prototype.close = function() {};
/**
*/
File.prototype.remove = function() {};
/**
* @param {string} destination
*/
File.prototype.copyTo = function(destination) {};
/**
* @param {string} newName
*/
File.prototype.renameTo = function(newName) {};
/**
*/
File.prototype.flush = function() {};
/**
* @param {number} offset
* @param {number} whence
* @return {number}
*/
File.prototype.seek = function(offset, whence) {};
/**
* @param {number} numBytes
* @return {string}
*/
File.prototype.read = function(numBytes) {};
/**
* @return {string}
*/
File.prototype.readln = function() {};
/**
* @return {Array.<string>}
*/
File.prototype.readAll = function() {};
/**
* @param {string} data
*/
File.prototype.write = function(data) {};
/**
* @param {string} data
*/
File.prototype.writeln = function(data) {};
/**
* @param {Array.<string>} lines
*/
File.prototype.writeAll = function(lines) {};
/**
* @param {RegExp=} filter
* @return {Array.<File>}
*/
File.prototype.list = function(filter) {};
/**
* @param {string} name
*/
File.prototype.mkdir = function(name) {};
/**
* @return {string}
*/
File.prototype.toURL = function() {};
/**
* @see https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API
*/
function Reflect() {}
/**
* @param {string} code
* @param {Object=} options
* @return {Object}
*/
Reflect.parse = function(code, options) {};
/**
* @param {number=} number
* @return {number}
*/
function version(number) {}
/**
*/
function revertVersion() {}
/**
* @param {...string} options
*/
function options(options) {}
/**
* @param {...string} files
*/
function load(files) {}
/**
* @param {...string} files
*/
function loadRelativeToScript(files) {}
/**
* @param {string} code
* @param {Object=} options
*/
function evaluate(code, options) {}
/**
* @param {string} file
* @return {number}
*/
function run(file) {}
/**
* @return {string}
*/
function readline() {}
/**
* @param {...*} exprs
*/
function print(exprs) {}
/**
* @param {...*} exprs
*/
function printErr(exprs) {}
/**
* @param {*} expr
*/
function putstr(expr) {}
/**
* @return {number}
*/
function dateNow() {}
/**
* @param {...string} names
* @return {string}
*/
function help(names) {}
/**
* @param {number=} status
*/
function quit(status) {}
/**
* @param {*} actual
* @param {*} expected
* @param {string=} msg
* @throws {Error}
*/
function assertEq(actual, expected, msg) {}
/**
* @throws {Error}
*/
function assertJit() {}
/**
*/
function gc() {}
/**
*/
function gcstats() {}
/**
* @param {string} name
* @param {number} value
*/
function gcparam(name, value) {}
/**
* @param {Object=} start
* @param {string} kind
*/
function countHeap(start, kind) {}
/**
* @return {Object}
*/
function makeFinalizeObserver() {}
/**
* @return {number}
*/
function finalizeCount() {}
/**
* @param {number} level
*/
function gczeal(level) {}
/**
* @param {boolean} debug
*/
function setDebug(debug) {}
/**
* @param {function} f
*/
function setDebuggerHandler(f) {}
/**
* @param {function} f
*/
function setThrowHook(f) {}
/**
* @param {function=} fun
* @param {number=} pc
* @param {*} exp
*/
function trap(fun, pc, exp) {}
/**
* @param {function} fun
* @param {number=} pc
*/
function untrap(fun, pc) {}
/**
* @param {function=} fun
* @param {number} line
*/
function line2pc(fun, line) {}
/**
* @param {function} fun
* @param {number=} pc
*/
function pc2line(fun, pc) {}
/**
* @param {number=} number
*/
function stackQuota(number) {}
/**
* @return {boolean}
*/
function stringsAreUTF8() {}
/**
* @param {number} mode
*/
function testUTF8(mode) {}
/**
* @param {string=} fileName
* @param {*=} start
* @param {*=} toFind
* @param {number=} maxDepth
* @param {*=} toIgnore
*/
function dumpHeap(fileName, start, toFind, maxDepth, toIgnore) {}
/**
*/
function dumpObject() {}
/**
* @param {string|boolean} mode
*/
function tracing(mode) {}
/**
* @param {...string} strings
*/
function stats(strings) {}
/**
*/
function build() {}
/**
* @param {Object=} obj
*/
function clear(obj) {}
/**
* @param {function} fun
* @param {Object=} scope
*/
function clone(fun, scope) {}
/**
* @param {Object} obj
*/
function getpda(obj) {}
/**
* @param {*} n
* @return {number}
*/
function toint32(n) {}
/**
* @param {number} n
* @param {string} str
* @param {boolean} save
*/
function evalInFrame(n, str, save) {}
/**
* @param {string} filename
* @param {string=} options
*/
function snarf(filename, options) {}
/**
* @param {string} filename
* @param {string=} options
*/
function read(filename, options) {}
/**
* @param {number=} seconds
*/
function timeout(seconds) {}
/**
* @param {Object} obj
*/
function parent(obj) {}
/**
* @param {Object} obj
*/
function wrap(obj) {}
/**
* @param {*} sd
*/
function serialize(sd) {}
/**
* @param {*} a
*/
function deserialize(a) {}
/**
*/
function mjitstats() {}
/**
*/
function stringstats() {}
/**
* @param {Object} callback
*/
function setGCCallback(callback) {}
/**
*/
function startTimingMutator() {}
/**
*/
function stopTimingMutator() {}
/**
* @throws {Error}
*/
function throwError() {}
/**
* @param {function} fun
*/
function disassemble(fun) {}
/**
* @param {function} fun
*/
function dis(fun) {}
/**
* @param {string} file
*/
function disfile(file) {}
/**
* @param {function} fun
*/
function dissrc(fun) {}
/**
* @param {function} fun
*/
function notes(fun) {}
/**
* @param {boolean} showArgs
* @param {boolean} showLocals
* @param {boolean} showThisProps
*/
function stackDump(showArgs, showLocals, showThisProps) {}
/**
* @param {string} str
* @return string
*/
function intern(str) {}
/**
* @param {Object} obj
*/
function getslx(obj) {}
/**
* @param {string} s
* @param {Object=} o
*/
function evalcx(s, o) {}
/**
* @param {string} str
*/
function evalInWorker(str) {}
/**
* @return {Object}
*/
function getSharedArrayBuffer() {}
/**
* @param {Object} buf
*/
function setSharedArrayBuffer(buf) {}
/**
* @param {Object} obj
* @return {*}
*/
function shapeOf(obj) {}
/**
* @param {...Array.<*>} arrays
*/
function arrayInfo(arrays) {}
/**
* @param {number} dt
*/
function sleep(dt) {}
/**
* @param {string} code
* @throws {Error}
*/
function compile(code) {}
/**
* @param {string} code
* @throws {Error}
*/
function parse(code) {}
/**
* @param {string} code
* @return {boolean}
*/
function syntaxParse(code) {}
/**
* @param {string} code
* @param {Object=} options
*/
function offThreadCompileScript(code, options) {}
/**
* @throws {Error}
*/
function runOffThreadScript() {}
/**
* @param {number=} seconds
* @param {function=} func
*/
function timeout(seconds, func) {}
/**
* @param {boolean} cond
*/
function interruptIf(cond) {}
/**
* @param {function} fun
*/
function invokeInterruptCallback(fun) {}
/**
* @param {function} fun
*/
function setInterruptCallback(fun) {}
/**
*/
function enableLastWarning() {}
/**
*/
function disableLastWarning() {}
/**
* @return {Object}
*/
function getLastWarning() {}
/**
*/
function clearLastWarning() {}
/**
* @return {number}
*/
function elapsed() {}
/**
* @param {function} func
* @return {string}
*/
function decompileFunction(func) {}
/**
* @param {function} func
* @return {string}
*/
function decompileBody(func) {}
/**
* @return {string}
*/
function decompileThis() {}
/**
* @return {string}
*/
function thisFilename() {}
/**
* @param {Object=} options
* @return {Object}
*/
function newGlobal(options) {}
/**
* @param {string} filename
* @param {number} offset
* @param {number} size
*/
function createMappedArrayBuffer(filename, offset, size) {}
/**
* @return {number}
*/
function getMaxArgs() {}
/**
* @return {Object}
*/
function objectEmulatingUndefined() {}
/**
* @return {boolean}
*/
function isCachingEnabled() {}
/**
* @param {boolean} b
*/
function setCachingEnabled(b) {}
/**
* @param {string} code
*/
function cacheEntry(code) {}
/**
*/
function printProfilerEvents() {}
/**
*/
function enableSingleStepProfiling() {}
/**
*/
function disableSingleStepProfiling() {}
/**
* @param {string} s
* @return {boolean}
*/
function isLatin1(s) {}
/**
* @return {number}
*/
function stackPointerInfo() {}
/**
* @param {Object} params
* @return {Array.<*>}
*/
function entryPoints(params) {}
/**
* @param {Object} object
* @param {boolean} deep
*/
function seal(object, deep) {}

View File

@@ -0,0 +1,100 @@
/**
* @externs
* Source: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Shell
*/
/**
* @type {Array.<string>}
*/
var arguments;
/**
* @type {Object}
*/
var environment;
/**
* @type {string}
*/
var history;
/**
*/
function help() {}
/**
* @param {string} className
*/
function defineClass(className) {}
/**
* @param {string} filename
*/
function deserialize(filename) {}
/**
*/
function gc() {}
/**
* @param {...string} files
*/
function load(files) {}
/**
* @param {string} className
*/
function loadClass(className) {}
/**
* @param {...*} exprs
*/
function print(exprs) {}
/**
* @param {string} path
* @param {string=} characterCoding
*/
function readFile(path, characterCoding) {}
/**
* @param {string} url
* @param {string=} characterCoding
*/
function readUrl(url, characterCoding) {}
/**
* @param {string} commandName
* @param {...*} args
*/
function runCommand(commandName, args) {}
/**
* @param {Object} object
*/
function seal(object) {}
/**
* @param {Object} object
* @param {string} filename
*/
function serialize(object, filename) {}
/**
* @param {string|function} functionOrScript
*/
function spawn(functionOrScript) {}
/**
* @param {function} fun
*/
function sync(fun) {}
/**
*/
function quit() {}
/**
* @param {number=} num
*/
function version(num) {}

View File

@@ -0,0 +1,24 @@
/**
* Externs for Spidermonkey-specific API.
*
* @externs
*/
/**
* @param {Object} object
* @param {*=} keyOnly
* @return {Object}
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator
*/
function Iterator(object, keyOnly) {}
/**
* @return {*}
*/
Iterator.prototype.next = function() {};
/**
* @type {Object}
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/StopIteration
*/
var StopIteration;

125
javascript/externs/vm/v8.js Normal file
View File

@@ -0,0 +1,125 @@
/*
* Copyright 2013 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview This file describes the externs API for V8-specific objects.
* @externs
*/
/**
* Stack frame elements in V8.
* @constructor
*/
function CallSite() {}
/**
* Returns the value of this.
* @return {Object|undefined}
*/
CallSite.prototype.getThis = function() {};
/**
* Returns the type of this as a string. This is the name of the function stored
* in the constructor field of this, if available, otherwise the object's
* [[Class]] internal property.
* @return {string|undefined}
*/
CallSite.prototype.getTypeName = function() {};
/**
* Returns the current function.
* @return {!Function|undefined}
*/
CallSite.prototype.getFunction = function() {};
/**
* Returns the name of the current function, typically its name property. If a
* name property is not available an attempt will be made to try to infer a name
* from the function's context.
* @return {string|undefined}
*/
CallSite.prototype.getFunctionName = function() {};
/**
* Returns the name of the property of this or one of its prototypes that holds
* the current function.
* @return {string|undefined}
*/
CallSite.prototype.getMethodName = function() {};
/**
* If this function was defined in a script returns the name of the script
* @return {string|undefined}
*/
CallSite.prototype.getFileName = function() {};
/**
* If this function was defined in a script returns the current line number.
* @return {number|undefined}
*/
CallSite.prototype.getLineNumber = function() {};
/**
* If this function was defined in a script returns the current column number.
* @return {number|undefined}
*/
CallSite.prototype.getColumnNumber = function() {};
/**
* If this function was created using a call to eval, returns a CallSite object
* representing the location where eval was called
* @return {CallSite|undefined}
*/
CallSite.prototype.getEvalOrigin = function() {};
/**
* Is this a toplevel invocation, that is, is this the global object?
* @return {boolean}
*/
CallSite.prototype.isToplevel = function() {};
/**
* Does this call take place in code defined by a call to eval?
* @return {boolean}
*/
CallSite.prototype.isEval = function() {};
/**
* Is this call in native V8 code?
* @return {boolean}
*/
CallSite.prototype.isNative = function() {};
/**
* Is this a constructor call?
* @return {boolean}
*/
CallSite.prototype.isConstructor = function() {};

View File

@@ -0,0 +1,669 @@
/*
* Copyright 2013 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for globals in Chrome. This file describes the
* externs API for the chrome.* object when running in a normal browser
* context. For APIs available in Chrome Extensions, see chrome_extensions.js
* in this directory.
* @externs
*/
/**
* namespace
* @const
*/
var chrome = {};
/**
* @see http://developer.chrome.com/apps/runtime.html#type-Port
* @constructor
*/
function Port() {}
/** @type {string} */
Port.prototype.name;
/** @type {!ChromeEvent} */
Port.prototype.onDisconnect;
/** @type {!ChromeEvent} */
Port.prototype.onMessage;
/** @type {!MessageSender|undefined} */
Port.prototype.sender;
/**
* @param {*} obj Message object.
* @return {undefined}
*/
Port.prototype.postMessage = function(obj) {};
/** @return {undefined} */
Port.prototype.disconnect = function() {};
/**
* @see https://developer.chrome.com/extensions/events.html
* @constructor
* TODO(tbreisacher): Update *Listener methods to take {function()}
* instead of {!Function}. See discussion at go/ChromeEvent-TODO
*/
function ChromeEvent() {}
/**
* @param {!Function} callback
* @return {undefined}
*/
ChromeEvent.prototype.addListener = function(callback) {};
/**
* @param {!Function} callback
* @return {undefined}
*/
ChromeEvent.prototype.removeListener = function(callback) {};
/**
* @param {!Function} callback
* @return {boolean}
*/
ChromeEvent.prototype.hasListener = function(callback) {};
/** @return {boolean} */
ChromeEvent.prototype.hasListeners = function() {};
// TODO(tbreisacher): Add the addRules, getRules, and removeRules methods?
/**
* Event whose listeners take a string parameter.
* @constructor
*/
function ChromeStringEvent() {}
/**
* @param {function(string): void} callback
* @return {undefined}
*/
ChromeStringEvent.prototype.addListener = function(callback) {};
/**
* @param {function(string): void} callback
* @return {undefined}
*/
ChromeStringEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(string): void} callback
* @return {boolean}
*/
ChromeStringEvent.prototype.hasListener = function(callback) {};
/** @return {boolean} */
ChromeStringEvent.prototype.hasListeners = function() {};
/**
* Event whose listeners take a boolean parameter.
* @constructor
*/
function ChromeBooleanEvent() {}
/**
* @param {function(boolean): void} callback
* @return {undefined}
*/
ChromeBooleanEvent.prototype.addListener = function(callback) {};
/**
* @param {function(boolean): void} callback
* @return {undefined}
*/
ChromeBooleanEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(boolean): void} callback
* @return {boolean}
*/
ChromeBooleanEvent.prototype.hasListener = function(callback) {};
/**
* @return {boolean}
*/
ChromeBooleanEvent.prototype.hasListeners = function() {};
/**
* Event whose listeners take a number parameter.
* @constructor
*/
function ChromeNumberEvent() {}
/**
* @param {function(number): void} callback
* @return {undefined}
*/
ChromeNumberEvent.prototype.addListener = function(callback) {};
/**
* @param {function(number): void} callback
* @return {undefined}
*/
ChromeNumberEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(number): void} callback
* @return {boolean}
*/
ChromeNumberEvent.prototype.hasListener = function(callback) {};
/**
* @return {boolean}
*/
ChromeNumberEvent.prototype.hasListeners = function() {};
/**
* Event whose listeners take an Object parameter.
* @constructor
*/
function ChromeObjectEvent() {}
/**
* @param {function(!Object): void} callback Callback.
* @return {undefined}
*/
ChromeObjectEvent.prototype.addListener = function(callback) {};
/**
* @param {function(!Object): void} callback Callback.
* @return {undefined}
*/
ChromeObjectEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(!Object): void} callback Callback.
* @return {boolean}
*/
ChromeObjectEvent.prototype.hasListener = function(callback) {};
/**
* @return {boolean}
*/
ChromeObjectEvent.prototype.hasListeners = function() {};
/**
* Event whose listeners take a string array parameter.
* @constructor
*/
function ChromeStringArrayEvent() {}
/**
* @param {function(!Array<string>): void} callback
* @return {undefined}
*/
ChromeStringArrayEvent.prototype.addListener = function(callback) {};
/**
* @param {function(!Array<string>): void} callback
* @return {undefined}
*/
ChromeStringArrayEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(!Array<string>): void} callback
* @return {boolean}
*/
ChromeStringArrayEvent.prototype.hasListener = function(callback) {};
/** @return {boolean} */
ChromeStringArrayEvent.prototype.hasListeners = function() {};
/**
* Event whose listeners take two strings as parameters.
* @constructor
*/
function ChromeStringStringEvent() {}
/**
* @param {function(string, string): void} callback
* @return {undefined}
*/
ChromeStringStringEvent.prototype.addListener = function(callback) {};
/**
* @param {function(string, string): void} callback
* @return {undefined}
*/
ChromeStringStringEvent.prototype.removeListener = function(callback) {};
/**
* @param {function(string, string): void} callback
* @return {boolean}
*/
ChromeStringStringEvent.prototype.hasListener = function(callback) {};
/** @return {boolean} */
ChromeStringStringEvent.prototype.hasListeners = function() {};
/**
* @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
* @constructor
*/
function MessageSender() {}
/** @type {!Tab|undefined} */
MessageSender.prototype.tab;
/** @type {number|undefined} */
MessageSender.prototype.frameId;
/** @type {string|undefined} */
MessageSender.prototype.id;
/** @type {string|undefined} */
MessageSender.prototype.url;
/** @type {string|undefined} */
MessageSender.prototype.tlsChannelId;
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/tabs#type-MutedInfoReason
*/
var MutedInfoReason = {
USER: '',
CAPTURE: '',
EXTENSION: '',
};
/**
* @see https://developer.chrome.com/extensions/tabs#type-MutedInfo
* @constructor
*/
var MutedInfo = function() {};
/** @type {boolean} */
MutedInfo.prototype.muted;
/** @type {!MutedInfoReason|string|undefined} */
MutedInfo.prototype.reason;
/** @type {string|undefined} */
MutedInfo.prototype.extensionId;
/**
* @see https://developer.chrome.com/extensions/tabs#type-Tab
* @constructor
*/
function Tab() {}
// TODO: Make this field optional once dependent projects have been updated.
/** @type {number} */
Tab.prototype.id;
/** @type {number} */
Tab.prototype.index;
/** @type {number} */
Tab.prototype.windowId;
// TODO: Make this field optional once dependent projects have been updated.
/** @type {number} */
Tab.prototype.openerTabId;
/** @type {boolean} */
Tab.prototype.highlighted;
/** @type {boolean} */
Tab.prototype.active;
/** @type {boolean} */
Tab.prototype.pinned;
/** @type {boolean|undefined} */
Tab.prototype.audible;
/** @type {boolean} */
Tab.prototype.discarded;
/** @type {boolean} */
Tab.prototype.autoDiscardable;
/** @type {!MutedInfo|undefined} */
Tab.prototype.mutedInfo;
// TODO: Make this field optional once dependent projects have been updated.
/** @type {string} */
Tab.prototype.url;
// TODO: Make this field optional once dependent projects have been updated.
/** @type {string} */
Tab.prototype.title;
// TODO: Make this field optional once dependent projects have been updated.
/** @type {string} */
Tab.prototype.favIconUrl;
// TODO: Make this field optional once dependent projects have been updated.
/** @type {string} */
Tab.prototype.status;
/** @type {boolean} */
Tab.prototype.incognito;
/** @type {number|undefined} */
Tab.prototype.width;
/** @type {number|undefined} */
Tab.prototype.height;
/** @type {string|undefined} */
Tab.prototype.sessionId;
/** @const */
chrome.app = {};
/**
* @see https://developer.chrome.com/webstore/inline_installation#already-installed
* @type {boolean}
*/
chrome.app.isInstalled;
/**
* @const
* @see https://developer.chrome.com/apps/webstore
*/
chrome.webstore = {};
/**
* @param {string|function()|function(string, string=)=}
* opt_urlOrSuccessCallbackOrFailureCallback Either the URL to install or
* the succcess callback taking no arg or the failure callback taking an
* error string arg.
* @param {function()|function(string, string=)=}
* opt_successCallbackOrFailureCallback Either the succcess callback taking
* no arg or the failure callback taking an error string arg.
* @param {function(string, string=)=} opt_failureCallback The failure callback.
* @return {undefined}
*/
chrome.webstore.install = function(
opt_urlOrSuccessCallbackOrFailureCallback,
opt_successCallbackOrFailureCallback,
opt_failureCallback) {};
/** @type {!ChromeStringEvent} */
chrome.webstore.onInstallStageChanged;
/** @type {!ChromeNumberEvent} */
chrome.webstore.onDownloadProgress;
/**
* @see https://developer.chrome.com/extensions/runtime.html
* @const
*/
chrome.runtime = {};
/** @type {!Object|undefined} */
chrome.runtime.lastError = {};
/** @type {string|undefined} */
chrome.runtime.lastError.message;
/**
* @param {string|!Object=} opt_extensionIdOrConnectInfo Either the
* extensionId to connect to, in which case connectInfo params can be
* passed in the next optional argument, or the connectInfo params.
* @param {!Object=} opt_connectInfo The connectInfo object,
* if arg1 was the extensionId to connect to.
* @return {!Port} New port.
*/
chrome.runtime.connect = function(
opt_extensionIdOrConnectInfo, opt_connectInfo) {};
/**
* @param {string|*} extensionIdOrMessage Either the extensionId to send the
* message to, in which case the message is passed as the next arg, or the
* message itself.
* @param {(*|!Object|function(*): void)=} opt_messageOrOptsOrCallback
* One of:
* The message, if arg1 was the extensionId.
* The options for message sending, if arg1 was the message and this
* argument is not a function.
* The callback, if arg1 was the message and this argument is a function.
* @param {(!Object|function(*): void)=} opt_optsOrCallback
* Either the options for message sending, if arg2 was the message,
* or the callback.
* @param {function(*): void=} opt_callback The callback function which
* takes a JSON response object sent by the handler of the request.
* @return {undefined}
*/
chrome.runtime.sendMessage = function(
extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
opt_callback) {};
/**
* Returns an object representing current load times. Note that the properties
* on the object do not change and the function must be called again to get
* up-to-date data.
*
* @return {!ChromeLoadTimes}
*/
chrome.loadTimes = function() {};
/**
* The data object given by chrome.loadTimes().
* @constructor
*/
function ChromeLoadTimes() {}
/** @type {number} */
ChromeLoadTimes.prototype.requestTime;
/** @type {number} */
ChromeLoadTimes.prototype.startLoadTime;
/** @type {number} */
ChromeLoadTimes.prototype.commitLoadTime;
/** @type {number} */
ChromeLoadTimes.prototype.finishDocumentLoadTime;
/** @type {number} */
ChromeLoadTimes.prototype.finishLoadTime;
/** @type {number} */
ChromeLoadTimes.prototype.firstPaintTime;
/** @type {number} */
ChromeLoadTimes.prototype.firstPaintAfterLoadTime;
/** @type {number} */
ChromeLoadTimes.prototype.navigationType;
/**
* True iff the resource was fetched over SPDY.
* @type {boolean}
*/
ChromeLoadTimes.prototype.wasFetchedViaSpdy;
/** @type {boolean} */
ChromeLoadTimes.prototype.wasNpnNegotiated;
/** @type {string} */
ChromeLoadTimes.prototype.npnNegotiatedProtocol;
/** @type {boolean} */
ChromeLoadTimes.prototype.wasAlternateProtocolAvailable;
/** @type {string} */
ChromeLoadTimes.prototype.connectionInfo;
/**
* Returns an object containing timing information.
* @return {!ChromeCsiInfo}
*/
chrome.csi = function() {};
/**
* The data object given by chrome.csi().
* @constructor
*/
function ChromeCsiInfo() {}
/**
* Same as chrome.loadTimes().requestTime, if defined.
* Otherwise, gives the same value as chrome.loadTimes().startLoadTime.
* In milliseconds, truncated.
* @type {number}
*/
ChromeCsiInfo.prototype.startE;
/**
* Same as chrome.loadTimes().finishDocumentLoadTime but in milliseconds and
* truncated.
* @type {number}
*/
ChromeCsiInfo.prototype.onloadT;
/**
* The time since startE in milliseconds.
* @type {number}
*/
ChromeCsiInfo.prototype.pageT;
/** @type {number} */
ChromeCsiInfo.prototype.tran;
/**
* @param {string|!ArrayBuffer|!Object} message
* @see https://developers.google.com/native-client/devguide/tutorial
* @return {undefined}
*/
HTMLEmbedElement.prototype.postMessage = function(message) {};

View File

@@ -0,0 +1,420 @@
/*
* Copyright 2014 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions of the fetch api.
*
* This api is still in development and not yet stable. Use at your
* own risk.
*
* Based on Living Standard — Last Updated 17 August 2016
*
* @see https://fetch.spec.whatwg.org/
* @externs
*/
/**
* @typedef {string}
* @see https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy
* Possible values: '', 'no-referrer', 'no-referrer-when-downgrade',
* 'same-origin', 'origin', 'strict-origin', 'origin-when-cross-origin',
* 'strict-origin-when-cross-origin', 'unsafe-url'
*/
var ReferrerPolicy;
/**
* @typedef {!Headers|!Array<!Array<string>>|!IObject<string,string>}
* @see https://fetch.spec.whatwg.org/#headersinit
*/
var HeadersInit;
/**
* @param {!HeadersInit=} opt_headersInit
* @constructor
* @implements {Iterable<!Array<string>>}
* @see https://fetch.spec.whatwg.org/#headers
*/
function Headers(opt_headersInit) {}
/**
* @param {string} name
* @param {string} value
* @return {undefined}
*/
Headers.prototype.append = function(name, value) {};
/**
* @param {string} name
* @return {undefined}
*/
Headers.prototype.delete = function(name) {};
/** @return {!Iterator<!Array<string>>} */
Headers.prototype.entries = function() {};
/**
* @param {string} name
* @return {?string}
*/
Headers.prototype.get = function(name) {};
/**
* @param {string} name
* @return {!Array<string>}
*/
Headers.prototype.getAll = function(name) {};
/**
* @param {string} name
* @return {boolean}
*/
Headers.prototype.has = function(name) {};
/** @return {!Iterator<string>} */
Headers.prototype.keys = function() {};
/**
* @param {string} name
* @param {string} value
* @return {undefined}
*/
Headers.prototype.set = function(name, value) {};
/** @return {!Iterator<string>} */
Headers.prototype.values = function() {};
/** @return {!Iterator<!Array<string>>} */
Headers.prototype[Symbol.iterator] = function() {};
/**
* @typedef {!Blob|!BufferSource|!FormData|string}
* @see https://fetch.spec.whatwg.org/#bodyinit
*/
var BodyInit;
/**
* @typedef {!BodyInit|!ReadableStream}
* @see https://fetch.spec.whatwg.org/#responsebodyinit
*/
var ResponseBodyInit;
/**
* @interface
* @see https://fetch.spec.whatwg.org/#body
*/
function Body() {};
/** @type {boolean} */
Body.prototype.bodyUsed;
/** @return {!Promise<!ArrayBuffer>} */
Body.prototype.arrayBuffer = function() {};
/** @return {!Promise<!Blob>} */
Body.prototype.blob = function() {};
/** @return {!Promise<!FormData>} */
Body.prototype.formData = function() {};
/** @return {!Promise<*>} */
Body.prototype.json = function() {};
/** @return {!Promise<string>} */
Body.prototype.text = function() {};
/**
* @typedef {!Request|string}
* @see https://fetch.spec.whatwg.org/#requestinfo
*/
var RequestInfo;
/**
* @param {!RequestInfo} input
* @param {!RequestInit=} opt_init
* @constructor
* @implements {Body}
* @see https://fetch.spec.whatwg.org/#request
*/
function Request(input, opt_init) {}
/** @override */
Request.prototype.bodyUsed;
/** @override */
Request.prototype.arrayBuffer = function() {};
/** @override */
Request.prototype.blob = function() {};
/** @override */
Request.prototype.formData = function() {};
/** @override */
Request.prototype.json = function() {};
/** @override */
Request.prototype.text = function() {};
/** @type {string} */
Request.prototype.method;
/** @type {string} */
Request.prototype.url;
/** @type {!Headers} */
Request.prototype.headers;
/** @type {!FetchRequestType} */
Request.prototype.type;
/** @type {!RequestDestination} */
Request.prototype.destination;
/** @type {string} */
Request.prototype.referrer;
/** @type {!RequestMode} */
Request.prototype.mode;
/** @type {!RequestCredentials} */
Request.prototype.credentials;
/** @type {!RequestCache} */
Request.prototype.cache;
/** @type {!RequestRedirect} */
Request.prototype.redirect;
/** @type {string} */
Request.prototype.integrity;
/** @return {!Request} */
Request.prototype.clone = function() {};
/**
* @record
* @see https://fetch.spec.whatwg.org/#requestinit
*/
function RequestInit() {};
/** @type {(undefined|string)} */
RequestInit.prototype.method;
/** @type {(undefined|!HeadersInit)} */
RequestInit.prototype.headers;
/** @type {(undefined|?BodyInit)} */
RequestInit.prototype.body;
/** @type {(undefined|string)} */
RequestInit.prototype.referrer;
/** @type {(undefined|!ReferrerPolicy)} */
RequestInit.prototype.referrerPolicy;
/** @type {(undefined|!RequestMode)} */
RequestInit.prototype.mode;
/** @type {(undefined|!RequestCredentials)} */
RequestInit.prototype.credentials;
/** @type {(undefined|!RequestCache)} */
RequestInit.prototype.cache;
/** @type {(undefined|!RequestRedirect)} */
RequestInit.prototype.redirect;
/** @type {(undefined|string)} */
RequestInit.prototype.integrity;
/** @type {(undefined|null)} */
RequestInit.prototype.window;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requesttype
* Possible values: '', 'audio', 'font', 'image', 'script', 'style',
* 'track', 'video'
*/
var FetchRequestType;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requestdestination
* Possible values: '', 'document', 'embed', 'font', 'image', 'manifest',
* 'media', 'object', 'report', 'script', 'serviceworker', 'sharedworker',
* 'style', 'worker', 'xslt'
*/
var RequestDestination;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requestmode
* Possible values: 'navigate', 'same-origin', 'no-cors', 'cors'
*/
var RequestMode ;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requestcredentials
* Possible values: 'omit', 'same-origin', 'include'
*/
var RequestCredentials;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requestcache
* Possible values: 'default', 'no-store', 'reload', 'no-cache', 'force-cache',
* 'only-if-cached'
*/
var RequestCache;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#requestredirect
* Possible values: 'follow', 'error', 'manual'
*/
var RequestRedirect;
/**
* @param {?ResponseBodyInit=} opt_body
* @param {!ResponseInit=} opt_init
* @constructor
* @implements {Body}
* @see https://fetch.spec.whatwg.org/#response
*/
function Response(opt_body, opt_init) {}
/** @return {!Response} */
Response.error = function() {};
/**
* @param {string} url
* @param {number=} opt_status
* @return {!Response}
*/
Response.redirect = function(url, opt_status) {};
/** @override */
Response.prototype.bodyUsed;
/** @override */
Response.prototype.arrayBuffer = function() {};
/** @override */
Response.prototype.blob = function() {};
/** @override */
Response.prototype.formData = function() {};
/** @override */
Response.prototype.json = function() {};
/** @override */
Response.prototype.text = function() {};
/** @type {!ResponseType} */
Response.prototype.type;
/** @type {string} */
Response.prototype.url;
/** @type {boolean} */
Response.prototype.redirected;
/** @type {number} */
Response.prototype.status;
/** @type {boolean} */
Response.prototype.ok;
/** @type {string} */
Response.prototype.statusText;
/** @type {!Headers} */
Response.prototype.headers;
/** @type {?ReadableStream} */
Response.prototype.body;
/** @type {!Promise<!Headers>} */
Response.prototype.trailer;
/** @return {!Response} */
Response.prototype.clone = function() {};
/**
* @record
* @see https://fetch.spec.whatwg.org/#responseinit
*/
function ResponseInit() {};
/** @type {(undefined|number)} */
ResponseInit.prototype.status;
/** @type {(undefined|string)} */
ResponseInit.prototype.statusText;
/** @type {(undefined|!HeadersInit)} */
ResponseInit.prototype.headers;
/**
* @typedef {string}
* @see https://fetch.spec.whatwg.org/#responsetype
* Possible values: 'basic', 'cors', 'default', 'error', 'opaque',
* 'opaqueredirect'
*/
var ResponseType;
/**
* @param {!RequestInfo} input
* @param {!RequestInit=} opt_init
* @return {!Promise<!Response>}
* @see https://fetch.spec.whatwg.org/#fetch-method
*/
function fetch(input, opt_init) {}
/**
* @param {!RequestInfo} input
* @param {!RequestInit=} opt_init
* @return {!Promise<!Response>}
* @see https://fetch.spec.whatwg.org/#fetch-method
*/
Window.prototype.fetch = function(input, opt_init) {};
/**
* @param {!RequestInfo} input
* @param {!RequestInit=} opt_init
* @return {!Promise<!Response>}
* @see https://fetch.spec.whatwg.org/#fetch-method
*/
WorkerGlobalScope.prototype.fetch = function(input, opt_init) {};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,226 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the Flash Object JavaScript methods. This
* file depends on w3c_dom2.js.
* Created from
* http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html
*
* @externs
*/
// Standard Methods.
/**
* Call a Flash function exported by ExternalInterface.
* @param {string} xmlString The XML string passed to Flash. The outer element
* should be {@code <invoke>}. A sample invocation string:
* {@code <invoke name="function_name" returntype="javascript">
* <string>test</string></invoke>}
* @return {string} The serialized return value from Flash that you can eval.
*/
HTMLObjectElement.prototype.CallFunction = function(xmlString) {};
/**
* Returns the value of the Flash variable specified by varName or null if the
* variable does not exist.
* @param {string} varName The variable name.
* @return {string?} The variable value.
*/
HTMLObjectElement.prototype.GetVariable = function(varName) {};
/**
* Activates the frame number specified by {@code frameNumber} in the current
* movie.
* @param {number} frameNumber A non-negative integer frame number.
* @return {undefined}
*/
HTMLObjectElement.prototype.GotoFrame = function(frameNumber) {};
/**
* @return {boolean} Whether the movie is currently playing.
*/
HTMLObjectElement.prototype.IsPlaying = function() {};
/**
* Loads the movie identified by {@code url} to the layer specified by {@code
* layerNumber}.
* @param {number} layerNumber The layer number.
* @param {string} url The movie URL.
* @return {undefined}
*/
HTMLObjectElement.prototype.LoadMovie = function(layerNumber, url) {};
/**
* Pans a zoomed-in movie to the coordinates specified by x and y. Use mode to
* specify whether the values for x and y are pixels or a percent of the window.
* When mode is 0, the coordinates are pixels; when mode is 1, the coordinates
* are percent of the window.
* @param {number} x The x-coordinate.
* @param {number} y The y-coordinate.
* @param {number} mode The mode.
* @return {undefined}
*/
HTMLObjectElement.prototype.Pan = function(x, y, mode) {};
/**
* @return {number} The percent of the Flash Player movie that has streamed
* into the browser so far; Possible values are from 0 to 100.
*/
HTMLObjectElement.prototype.PercentLoaded = function() {};
/**
* Starts playing the movie.
* @return {undefined}
*/
HTMLObjectElement.prototype.Play = function() {};
/**
* Goes to the first frame.
* @return {undefined}
*/
HTMLObjectElement.prototype.Rewind = function() {};
/**
* Sets the value of the flash variable.
* @param {string} variableName The variable name.
* @param {string} value The value.
* @return {undefined}
*/
HTMLObjectElement.prototype.SetVariable = function(variableName, value) {};
/**
* Zooms in on a rectangular area of the movie. The units of the coordinates
* are in twips (1440 units per inch).
* @param {number} left The left coordinate.
* @param {number} top The top coordinate.
* @param {number} right The right coordinate.
* @param {number} bottom The bottom coordinate.
* @return {undefined}
*/
HTMLObjectElement.prototype.SetZoomRect = function(left, top, right, bottom) {};
/**
* Stops playing the movie.
* @return {undefined}
*/
HTMLObjectElement.prototype.StopPlay = function() {};
/**
* @return {number} The total number of frames in the movie.
*/
HTMLObjectElement.prototype.TotalFrames = function() {};
/**
* Zooms the view by a relative scale factor.
* @param {number} percent The percentage scale factor, should be an integer.
* @return {undefined}
*/
HTMLObjectElement.prototype.Zoom = function(percent) {};
// TellTarget Methods.
/**
* Executes the action in the timeline specified by {@code target} in the
* specified frame.
* @param {string} target The timeline.
* @param {number} frameNumber The frame number.
* @return {undefined}
*/
HTMLObjectElement.prototype.TCallFrame = function(target, frameNumber) {};
/**
* Executes the action in the timeline specified by {@code target} in the
* specified frame.
* @param {string} target The timeline.
* @param {string} label The frame label.
* @return {undefined}
*/
HTMLObjectElement.prototype.TCallLabel = function(target, label) {};
/**
* Returns the number of the current frame for the specified timeline.
* @param {string} target The timeline.
* @return {number} The number of the current frame.
*/
HTMLObjectElement.prototype.TCurentFrame = function(target) {};
/**
* Returns the label of the current frame for the specified timeline.
* @param {string} target The timeline.
* @return {string} The label of the current frame, empty string if no
* current frame.
*/
HTMLObjectElement.prototype.TCurrentLabel = function(target) {};
/**
* Returns a string indicating the value of the property in the
* specified timeline.
* @param {string} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @return {string} The value of the property.
*/
HTMLObjectElement.prototype.TGetProperty = function(target, property) {};
/**
* Returns a number indicating the value of the property in the specified
* timeline.
* @param {string} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @return {number} A number indicating the value of the property.
*/
HTMLObjectElement.prototype.TGetPropertyAsNumber = function(target, property) {};
/**
* Goes to the specified frame number in the specified timeline.
* @param {string} target The timeline.
* @param {number} frameNumber The frame number.
* @return {undefined}
*/
HTMLObjectElement.prototype.TGotoFrame = function(target, frameNumber) {};
/**
* Goes to the specified frame label in the specified timeline.
* @param {string} target The timeline.
* @param {string} label The framelabel.
* @return {undefined}
*/
HTMLObjectElement.prototype.TGotoLabel = function(target, label) {};
/**
* Plays the specified timeline.
* @param {number} target The timeline.
* @return {undefined}
*/
HTMLObjectElement.prototype.TPlay = function(target) {};
/**
* Sets the value of the property in the specified timeline.
* @param {number} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @param {string|number} value The value.
* @return {undefined}
*/
HTMLObjectElement.prototype.TSetProperty = function(target, property, value) {};
/**
* Stops the specified timeline.
* @param {number} target The timeline.
* @return {undefined}
*/
HTMLObjectElement.prototype.TStopPlay = function(target) {};

View File

@@ -0,0 +1,126 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for Gecko's custom CSS properties. Copied from:
* http://mxr.mozilla.org/mozilla2.0/source/dom/interfaces/css/nsIDOMCSS2Properties.idl
*
* @externs
* @author nicksantos@google.com (Nick Santos)
*/
/** @type {string} */ CSSProperties.prototype.MozAppearance;
/** @type {string} */ CSSProperties.prototype.MozBackfaceVisibility;
/** @type {string} */ CSSProperties.prototype.MozBackgroundClip;
/** @type {string} */ CSSProperties.prototype.MozBackgroundInlinePolicy;
/** @type {string} */ CSSProperties.prototype.MozBackgroundOrigin;
/** @type {string} */ CSSProperties.prototype.MozBinding;
/** @type {string} */ CSSProperties.prototype.MozBorderBottomColors;
/** @type {string} */ CSSProperties.prototype.MozBorderEnd;
/** @type {string} */ CSSProperties.prototype.MozBorderEndColor;
/** @type {string} */ CSSProperties.prototype.MozBorderEndStyle;
/** @type {string} */ CSSProperties.prototype.MozBorderEndWidth;
/** @type {string} */ CSSProperties.prototype.MozBorderImage;
/** @type {string} */ CSSProperties.prototype.MozBorderLeftColors;
/** @type {string} */ CSSProperties.prototype.MozBorderRadius;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopleft;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopright;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomleft;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomright;
/** @type {string} */ CSSProperties.prototype.MozBorderRightColors;
/** @type {string} */ CSSProperties.prototype.MozBorderStart;
/** @type {string} */ CSSProperties.prototype.MozBorderStartColor;
/** @type {string} */ CSSProperties.prototype.MozBorderStartStyle;
/** @type {string} */ CSSProperties.prototype.MozBorderStartWidth;
/** @type {string} */ CSSProperties.prototype.MozBorderTopColors;
/** @type {string} */ CSSProperties.prototype.MozBoxAlign;
/** @type {string} */ CSSProperties.prototype.MozBoxDirection;
/** @type {string} */ CSSProperties.prototype.MozBoxFlex;
/** @type {string} */ CSSProperties.prototype.MozBoxOrdinalGroup;
/** @type {string} */ CSSProperties.prototype.MozBoxOrient;
/** @type {string} */ CSSProperties.prototype.MozBoxPack;
/** @type {string} */ CSSProperties.prototype.MozBoxSizing;
/** @type {string} */ CSSProperties.prototype.MozBoxShadow;
/** @type {string} */ CSSProperties.prototype.MozColumnCount;
/** @type {string} */ CSSProperties.prototype.MozColumnGap;
/** @type {string} */ CSSProperties.prototype.MozColumnRule;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleColor;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleStyle;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleWidth;
/** @type {string} */ CSSProperties.prototype.MozColumnWidth;
/** @type {string} */ CSSProperties.prototype.MozFloatEdge;
/** @type {string} */ CSSProperties.prototype.MozFontFeatureSettings;
/** @type {string} */ CSSProperties.prototype.MozFontLanguageOverride;
/** @type {string} */ CSSProperties.prototype.MozForceBrokenImageIcon;
/** @type {string} */ CSSProperties.prototype.MozImageRegion;
/** @type {string} */ CSSProperties.prototype.MozMarginEnd;
/** @type {string} */ CSSProperties.prototype.MozMarginStart;
/** @type {number|string} */ CSSProperties.prototype.MozOpacity;
/** @type {string} */ CSSProperties.prototype.MozOutline;
/** @type {string} */ CSSProperties.prototype.MozOutlineColor;
/** @type {string} */ CSSProperties.prototype.MozOutlineOffset;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadius;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomleft;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomright;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopleft;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopright;
/** @type {string} */ CSSProperties.prototype.MozOutlineStyle;
/** @type {string} */ CSSProperties.prototype.MozOutlineWidth;
/** @type {string} */ CSSProperties.prototype.MozPaddingEnd;
/** @type {string} */ CSSProperties.prototype.MozPaddingStart;
/** @type {string} */ CSSProperties.prototype.MozPerspective;
/** @type {string} */ CSSProperties.prototype.MozStackSizing;
/** @type {string} */ CSSProperties.prototype.MozTabSize;
/** @type {string} */ CSSProperties.prototype.MozTransform;
/** @type {string} */ CSSProperties.prototype.MozTransformOrigin;
/** @type {string} */ CSSProperties.prototype.MozTransition;
/** @type {string} */ CSSProperties.prototype.MozTransitionDelay;
/** @type {string} */ CSSProperties.prototype.MozTransitionDuration;
/** @type {string} */ CSSProperties.prototype.MozTransitionProperty;
/** @type {string} */ CSSProperties.prototype.MozTransitionTimingFunction;
/** @type {string} */ CSSProperties.prototype.MozUserFocus;
/** @type {string} */ CSSProperties.prototype.MozUserInput;
/** @type {string} */ CSSProperties.prototype.MozUserModify;
/** @type {string} */ CSSProperties.prototype.MozUserSelect;
/** @type {string} */ CSSProperties.prototype.MozWindowShadow;
// These are non-standard Gecko CSSOM properties on Window.prototype.screen.
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.availTop
*/
Screen.prototype.availTop;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.availLeft
*/
Screen.prototype.availLeft;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.left
*/
Screen.prototype.left;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.top
*/
Screen.prototype.top;

View File

@@ -0,0 +1,903 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over
* W3C's DOM specification by Gecko. This file depends on
* w3c_dom2.js.
*
* When a non-standard extension appears in both Gecko and IE, we put
* it in gecko_dom.js
*
* @externs
*/
// TODO: Almost all of it has not been annotated with types.
// Gecko DOM;
/**
* Mozilla only???
* @constructor
* @extends {HTMLElement}
*/
function HTMLSpanElement() {}
/**
* @see https://developer.mozilla.org/en/Components_object
*/
Window.prototype.Components;
/**
* @type {Window}
* @see https://developer.mozilla.org/en/DOM/window.content
*/
Window.prototype.content;
/**
* @type {boolean}
* @see https://developer.mozilla.org/en/DOM/window.closed
*/
Window.prototype.closed;
/** @see https://developer.mozilla.org/en/DOM/window.controllers */
Window.prototype.controllers;
/** @see https://developer.mozilla.org/en/DOM/window.crypto */
Window.prototype.crypto;
/**
* Gets/sets the status bar text for the given window.
* @type {string}
* @see https://developer.mozilla.org/en/DOM/window.defaultStatus
*/
Window.prototype.defaultStatus;
/** @see https://developer.mozilla.org/en/DOM/window.dialogArguments */
Window.prototype.dialogArguments;
/** @see https://developer.mozilla.org/en/DOM/window.directories */
Window.prototype.directories;
/**
* @type {HTMLObjectElement|HTMLIFrameElement|null}
* @see https://developer.mozilla.org/en/DOM/window.frameElement
*/
Window.prototype.frameElement;
/**
* Allows lookup of frames by index or by name.
* @type {?Object}
* @see https://developer.mozilla.org/en/DOM/window.frames
*/
Window.prototype.frames;
/**
* @type {boolean}
* @see https://developer.mozilla.org/en/DOM/window.fullScreen
*/
Window.prototype.fullScreen;
/**
* @return {!Promise<!BatteryManager>}
* @see http://www.w3.org/TR/battery-status/
*/
Navigator.prototype.getBattery = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/Storage#globalStorage
*/
Window.prototype.globalStorage;
/**
* @type {!History}
* @suppress {duplicate}
* @see https://developer.mozilla.org/en/DOM/window.history
*/
var history;
/**
* Returns the number of frames (either frame or iframe elements) in the
* window.
*
* @type {number}
* @see https://developer.mozilla.org/en/DOM/window.length
*/
Window.prototype.length;
/**
* Location has an exception in the DeclaredGlobalExternsOnWindow pass
* so we have to manually include it:
* https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/DeclaredGlobalExternsOnWindow.java#L116
*
* @type {!Location}
* @implicitCast
* @see https://developer.mozilla.org/en/DOM/window.location
*/
Window.prototype.location;
/**
* @see https://developer.mozilla.org/en/DOM/window.locationbar
*/
Window.prototype.locationbar;
/**
* @see https://developer.mozilla.org/en/DOM/window.menubar
*/
Window.prototype.menubar;
/**
* @type {string}
* @see https://developer.mozilla.org/en/DOM/window.name
*/
Window.prototype.name;
/**
* @type {Navigator}
* @see https://developer.mozilla.org/en/DOM/window.navigator
*/
Window.prototype.navigator;
/**
* @type {?Window}
* @see https://developer.mozilla.org/en/DOM/window.opener
*/
Window.prototype.opener;
/**
* @type {!Window}
* @see https://developer.mozilla.org/en/DOM/window.parent
*/
Window.prototype.parent;
/** @see https://developer.mozilla.org/en/DOM/window.personalbar */
Window.prototype.personalbar;
/** @see https://developer.mozilla.org/en/DOM/window.pkcs11 */
Window.prototype.pkcs11;
/** @see https://developer.mozilla.org/en/DOM/window */
Window.prototype.returnValue;
/** @see https://developer.mozilla.org/en/DOM/window.scrollbars */
Window.prototype.scrollbars;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.scrollMaxX
*/
Window.prototype.scrollMaxX;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.scrollMaxY
*/
Window.prototype.scrollMaxY;
/**
* @type {!Window}
* @see https://developer.mozilla.org/en/DOM/window.self
*/
Window.prototype.self;
/** @see https://developer.mozilla.org/en/DOM/Storage#sessionStorage */
Window.prototype.sessionStorage;
/** @see https://developer.mozilla.org/en/DOM/window.sidebar */
Window.prototype.sidebar;
/**
* @type {?string}
* @see https://developer.mozilla.org/en/DOM/window.status
*/
Window.prototype.status;
/** @see https://developer.mozilla.org/en/DOM/window.statusbar */
Window.prototype.statusbar;
/** @see https://developer.mozilla.org/en/DOM/window.toolbar */
Window.prototype.toolbar;
/**
* @type {!Window}
* @see https://developer.mozilla.org/en/DOM/window.self
*/
Window.prototype.top;
/**
* @type {!Window}
* @see https://developer.mozilla.org/en/DOM/window.self
*/
Window.prototype.window;
/**
* @param {*} message
* @see https://developer.mozilla.org/en/DOM/window.alert
* @return {undefined}
*/
Window.prototype.alert = function(message) {};
/**
* Decodes a string of data which has been encoded using base-64 encoding.
*
* @param {string} encodedData
* @return {string}
* @see https://developer.mozilla.org/en/DOM/window.atob
* @nosideeffects
*/
function atob(encodedData) {}
/**
* @see https://developer.mozilla.org/en/DOM/window.back
* @return {undefined}
*/
Window.prototype.back = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/window.blur
* @return {undefined}
*/
Window.prototype.blur = function() {};
/**
* @param {string} stringToEncode
* @return {string}
* @see https://developer.mozilla.org/en/DOM/window.btoa
* @nosideeffects
*/
function btoa(stringToEncode) {}
/** @deprecated */
Window.prototype.captureEvents;
/**
* @see https://developer.mozilla.org/en/DOM/window.close
* @return {undefined}
*/
Window.prototype.close = function() {};
/**@see https://developer.mozilla.org/en/DOM/window.find */
Window.prototype.find;
/**
* @see https://developer.mozilla.org/en/DOM/window.focus
* @return {undefined}
*/
Window.prototype.focus = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/window.forward
* @return {undefined}
*/
Window.prototype.forward = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/window.getAttention
* @return {undefined}
*/
Window.prototype.getAttention = function() {};
/**
* @return {Selection}
* @see https://developer.mozilla.org/en/DOM/window.getSelection
* @nosideeffects
*/
Window.prototype.getSelection = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/window.home
* @return {undefined}
*/
Window.prototype.home = function() {};
Window.prototype.openDialog;
Window.prototype.releaseEvents;
Window.prototype.scrollByLines;
Window.prototype.scrollByPages;
/**
* @param {string} uri
* @param {?=} opt_arguments
* @param {string=} opt_options
* @see https://developer.mozilla.org/en/DOM/window.showModalDialog
*/
Window.prototype.showModalDialog;
Window.prototype.sizeToContent;
/**
* @see http://msdn.microsoft.com/en-us/library/ms536769(VS.85).aspx
* @return {undefined}
*/
Window.prototype.stop = function() {};
Window.prototype.updateCommands;
// properties of Document
/**
* @see https://developer.mozilla.org/en/DOM/document.alinkColor
* @type {string}
*/
Document.prototype.alinkColor;
/**
* @see https://developer.mozilla.org/en/DOM/document.anchors
* @type {HTMLCollection<!HTMLAnchorElement>}
*/
Document.prototype.anchors;
/**
* @see https://developer.mozilla.org/en/DOM/document.applets
* @type {HTMLCollection<!HTMLAppletElement>}
*/
Document.prototype.applets;
/** @type {boolean} */ Document.prototype.async;
/** @type {string?} */ Document.prototype.baseURI;
/**
* @see https://developer.mozilla.org/en/DOM/document.bgColor
* @type {string}
*/
Document.prototype.bgColor;
/** @type {HTMLBodyElement} */ Document.prototype.body;
Document.prototype.characterSet;
/**
* @see https://developer.mozilla.org/en/DOM/document.compatMode
* @type {string}
*/
Document.prototype.compatMode;
Document.prototype.contentType;
/** @type {string} */ Document.prototype.cookie;
Document.prototype.defaultView;
/**
* @see https://developer.mozilla.org/en/DOM/document.designMode
* @type {string}
*/
Document.prototype.designMode;
Document.prototype.documentURIObject;
/**
* @see https://developer.mozilla.org/en/DOM/document.domain
* @type {string}
*/
Document.prototype.domain;
/**
* @see https://developer.mozilla.org/en/DOM/document.embeds
* @type {HTMLCollection<!HTMLEmbedElement>}
*/
Document.prototype.embeds;
/**
* @see https://developer.mozilla.org/en/DOM/document.fgColor
* @type {string}
*/
Document.prototype.fgColor;
/** @type {Element} */ Document.prototype.firstChild;
/**
* @see https://developer.mozilla.org/en/DOM/document.forms
* @type {HTMLCollection<!HTMLFormElement>}
*/
Document.prototype.forms;
/** @type {number} */
Document.prototype.height;
/** @type {HTMLCollection<!HTMLImageElement>} */
Document.prototype.images;
/**
* @type {string}
* @see https://developer.mozilla.org/en/DOM/document.lastModified
*/
Document.prototype.lastModified;
/**
* @type {string}
* @see https://developer.mozilla.org/en/DOM/document.linkColor
*/
Document.prototype.linkColor;
/**
* @see https://developer.mozilla.org/en/DOM/document.links
* @type {HTMLCollection<(!HTMLAreaElement|!HTMLAnchorElement)>}
*/
Document.prototype.links;
/**
* @type {!Location}
* @implicitCast
*/
Document.prototype.location;
Document.prototype.namespaceURI;
Document.prototype.nodePrincipal;
Document.prototype.plugins;
Document.prototype.popupNode;
/**
* @type {string}
* @see https://developer.mozilla.org/en/DOM/document.referrer
*/
Document.prototype.referrer;
/**
* @type {StyleSheetList}
* @see https://developer.mozilla.org/en/DOM/document.styleSheets
*/
Document.prototype.styleSheets;
/** @type {?string} */ Document.prototype.title;
Document.prototype.tooltipNode;
/** @type {string} */ Document.prototype.URL;
/**
* @type {string}
* @see https://developer.mozilla.org/en/DOM/document.vlinkColor
*/
Document.prototype.vlinkColor;
/** @type {number} */ Document.prototype.width;
// Methods of Document
/**
* @see https://developer.mozilla.org/en/DOM/document.clear
* @return {undefined}
*/
Document.prototype.clear = function() {};
/**
* @see https://developer.mozilla.org/en/DOM/document.close
*/
Document.prototype.close;
/**
* @param {string} type
* @return {Event}
*/
Document.prototype.createEvent = function(type) {};
Document.prototype.createNSResolver;
/** @return {Range} */ Document.prototype.createRange = function() {};
Document.prototype.createTreeWalker;
Document.prototype.evaluate;
/**
* @param {string} commandName
* @param {?boolean=} opt_showUi
* @param {*=} opt_value
* @see https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commands
*/
Document.prototype.execCommand;
/**
* @param {string} name
* @return {!NodeList<!Element>}
* @nosideeffects
* @see https://developer.mozilla.org/en/DOM/document.getElementsByClassName
*/
Document.prototype.getElementsByClassName = function(name) {};
/**
* @param {string} uri
* @return {undefined}
*/
Document.prototype.load = function(uri) {};
Document.prototype.loadOverlay;
/**
* @see https://developer.mozilla.org/en/DOM/document.open
*/
Document.prototype.open;
/**
* @see https://developer.mozilla.org/en/Midas
* @see http://msdn.microsoft.com/en-us/library/ms536676(VS.85).aspx
*/
Document.prototype.queryCommandEnabled;
/**
* @see https://developer.mozilla.org/en/Midas
* @see http://msdn.microsoft.com/en-us/library/ms536678(VS.85).aspx
*/
Document.prototype.queryCommandIndeterm;
/**
* @see https://developer.mozilla.org/en/Midas
* @see http://msdn.microsoft.com/en-us/library/ms536679(VS.85).aspx
*/
Document.prototype.queryCommandState;
/**
* @see https://developer.mozilla.org/en/DOM/document.queryCommandSupported
* @see http://msdn.microsoft.com/en-us/library/ms536681(VS.85).aspx
* @param {string} command
* @return {?} Implementation-specific.
*/
Document.prototype.queryCommandSupported;
/**
* @see https://developer.mozilla.org/en/Midas
* @see http://msdn.microsoft.com/en-us/library/ms536683(VS.85).aspx
*/
Document.prototype.queryCommandValue;
/**
* @see https://developer.mozilla.org/en/DOM/document.write
* @param {string} text
* @return {undefined}
*/
Document.prototype.write = function(text) {};
/**
* @see https://developer.mozilla.org/en/DOM/document.writeln
* @param {string} text
* @return {undefined}
*/
Document.prototype.writeln = function(text) {};
Document.prototype.ononline;
Document.prototype.onoffline;
// XUL
/**
* @see http://developer.mozilla.org/en/DOM/document.getBoxObjectFor
* @return {BoxObject}
* @nosideeffects
*/
Document.prototype.getBoxObjectFor = function(element) {};
// From:
// http://lxr.mozilla.org/mozilla1.8/source/dom/public/idl/range/nsIDOMNSRange.idl
/**
* @param {string} tag
* @return {DocumentFragment}
*/
Range.prototype.createContextualFragment;
/**
* @param {Node} parent
* @param {number} offset
* @return {boolean}
* @nosideeffects
*/
Range.prototype.isPointInRange;
/**
* @param {Node} parent
* @param {number} offset
* @return {number}
* @nosideeffects
*/
Range.prototype.comparePoint;
/**
* @param {Node} n
* @return {boolean}
* @nosideeffects
*/
Range.prototype.intersectsNode;
/**
* @param {Node} n
* @return {number}
* @nosideeffects
*/
Range.prototype.compareNode;
/** @constructor */
function Selection() {}
/**
* @type {Node}
* @see https://developer.mozilla.org/en/DOM/Selection/anchorNode
*/
Selection.prototype.anchorNode;
/**
* @type {number}
* @see https://developer.mozilla.org/en/DOM/Selection/anchorOffset
*/
Selection.prototype.anchorOffset;
/**
* @type {Node}
* @see https://developer.mozilla.org/en/DOM/Selection/focusNode
*/
Selection.prototype.focusNode;
/**
* @type {number}
* @see https://developer.mozilla.org/en/DOM/Selection/focusOffset
*/
Selection.prototype.focusOffset;
/**
* @type {boolean}
* @see https://developer.mozilla.org/en/DOM/Selection/isCollapsed
*/
Selection.prototype.isCollapsed;
/**
* @type {number}
* @see https://developer.mozilla.org/en/DOM/Selection/rangeCount
*/
Selection.prototype.rangeCount;
/**
* @param {Range} range
* @return {undefined}
* @see https://developer.mozilla.org/en/DOM/Selection/addRange
*/
Selection.prototype.addRange = function(range) {};
/**
* @param {number} index
* @return {Range}
* @see https://developer.mozilla.org/en/DOM/Selection/getRangeAt
* @nosideeffects
*/
Selection.prototype.getRangeAt = function(index) {};
/**
* @param {Node} node
* @param {number} index
* @return {undefined}
* @see https://developer.mozilla.org/en/DOM/Selection/collapse
*/
Selection.prototype.collapse = function(node, index) {};
/**
* @return {undefined}
* @see https://developer.mozilla.org/en/DOM/Selection/collapseToEnd
*/
Selection.prototype.collapseToEnd = function() {};
/**
* @return {undefined}
* @see https://developer.mozilla.org/en/DOM/Selection/collapseToStart
*/
Selection.prototype.collapseToStart = function() {};
/**
* @param {Node} node
* @param {boolean} partlyContained
* @return {boolean}
* @see https://developer.mozilla.org/en/DOM/Selection/containsNode
* @nosideeffects
*/
Selection.prototype.containsNode = function(node, partlyContained) {};
/**
* @see https://developer.mozilla.org/en/DOM/Selection/deleteFromDocument
* @return {undefined}
*/
Selection.prototype.deleteFromDocument = function() {};
/**
* @param {Node} parentNode
* @param {number} offset
* @see https://developer.mozilla.org/en/DOM/Selection/extend
* @return {undefined}
*/
Selection.prototype.extend = function(parentNode, offset) {};
/**
* @see https://developer.mozilla.org/en/DOM/Selection/removeAllRanges
* @return {undefined}
*/
Selection.prototype.removeAllRanges = function() {};
/**
* @param {Range} range
* @see https://developer.mozilla.org/en/DOM/Selection/removeRange
* @return {undefined}
*/
Selection.prototype.removeRange = function(range) {};
/**
* @param {Node} parentNode
* @see https://developer.mozilla.org/en/DOM/Selection/selectAllChildren
*/
Selection.prototype.selectAllChildren;
/**
* @see https://developer.mozilla.org/en/DOM/Selection/selectionLanguageChange
*/
Selection.prototype.selectionLanguageChange;
/**
* @type {!NodeList<!Element>}
* @see https://developer.mozilla.org/en/DOM/element.children
*/
Element.prototype.children;
/**
* Firebug sets this property on elements it is inserting into the DOM.
* @type {boolean}
*/
Element.prototype.firebugIgnore;
/**
* Note: According to the spec, id is actually defined on HTMLElement and
* SVGElement, rather than Element. Deliberately ignore this so that saying
* Element.id is allowed.
* @type {string}
* @implicitCast
*/
Element.prototype.id;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Parsing/#widl-Element-innerHTML
* @implicitCast
*/
Element.prototype.innerHTML;
/**
* Note: According to the spec, name is defined on specific types of
* HTMLElements, rather than on Node, Element, or HTMLElement directly.
* Ignore this.
* @type {string}
*/
Element.prototype.name;
Element.prototype.nodePrincipal;
/**
* @type {!CSSStyleDeclaration}
* This belongs on HTMLElement rather than Element, but that
* breaks a lot.
* TODO(rdcronin): Remove this declaration once the breakage is fixed.
*/
Element.prototype.style;
/**
* @override
* @return {!Element}
*/
Element.prototype.cloneNode = function(deep) {};
/** @return {undefined} */
Element.prototype.blur = function() {};
/** @return {undefined} */
Element.prototype.click = function() {};
/** @return {undefined} */
Element.prototype.focus = function() {};
/** @type {number} */
HTMLInputElement.prototype.selectionStart;
/** @type {number} */
HTMLInputElement.prototype.selectionEnd;
/**
* @param {number} selectionStart
* @param {number} selectionEnd
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-textarea/input-setselectionrange
* @return {undefined}
*/
HTMLInputElement.prototype.setSelectionRange =
function(selectionStart, selectionEnd) {};
/** @type {number} */
HTMLTextAreaElement.prototype.selectionStart;
/** @type {number} */
HTMLTextAreaElement.prototype.selectionEnd;
/**
* @param {number} selectionStart
* @param {number} selectionEnd
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#dom-textarea/input-setselectionrange
* @return {undefined}
*/
HTMLTextAreaElement.prototype.setSelectionRange =
function(selectionStart, selectionEnd) {};
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.buildID
*/
Navigator.prototype.buildID;
/**
* @type {!Array<string>|undefined}
* @see https://developer.mozilla.org/en/Navigator.languages
*/
Navigator.prototype.languages;
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.oscpu
*/
Navigator.prototype.oscpu;
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.productSub
*/
Navigator.prototype.productSub;
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.securityPolicy
*/
Navigator.prototype.securityPolicy;
/**
* @param {string} url
* @param {ArrayBufferView|Blob|string|FormData=} opt_data
* @return {boolean}
* @see https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon
*/
Navigator.prototype.sendBeacon = function(url, opt_data) {};
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.vendor
*/
Navigator.prototype.vendor;
/**
* @type {string}
* @see https://developer.mozilla.org/en/Navigator.vendorSub
*/
Navigator.prototype.vendorSub;
/** @constructor */
function BoxObject() {}
/** @type {Element} */
BoxObject.prototype.element;
/** @type {number} */
BoxObject.prototype.screenX;
/** @type {number} */
BoxObject.prototype.screenY;
/** @type {number} */
BoxObject.prototype.x;
/** @type {number} */
BoxObject.prototype.y;
/** @type {number} */
BoxObject.prototype.width;
/**
* @param {Element} element
* @param {?string=} pseudoElt
* @return {?CSSStyleDeclaration}
* @nosideeffects
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397
*/
function getComputedStyle(element, pseudoElt) {}

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over
* W3C's event specification by Gecko. This file depends on
* w3c_event.js.
*
* @externs
*/
// TODO: Almost all of it has not been annotated with types.
/** @type {number} */ Event.prototype.HORIZONTAL_AXIS;
/** @type {number} */ Event.prototype.VERTICAL_AXIS;
/** @type {boolean} */ Event.prototype.altKey;
/** @type {number} */ Event.prototype.axis;
/** @type {number} */ Event.prototype.button;
/** @type {boolean} */ Event.prototype.cancelBubble;
/** @type {number} */ Event.prototype.charCode;
/** @type {number} */ Event.prototype.clientX;
/** @type {number} */ Event.prototype.clientY;
/** @type {boolean} */ Event.prototype.ctrlKey;
/** @type {EventTarget} */ Event.prototype.explicitOriginalTarget;
/** @type {boolean} */ Event.prototype.isChar;
/** @type {boolean} */ Event.prototype.isTrusted;
/** @type {number} */ Event.prototype.keyCode;
/** @type {number} */ Event.prototype.layerX;
/** @type {number} */ Event.prototype.layerY;
/** @type {boolean} */ Event.prototype.metaKey;
/** @type {EventTarget} */ Event.prototype.originalTarget;
/** @type {number} */ Event.prototype.pageX;
/** @type {number} */ Event.prototype.pageY;
/** @type {EventTarget|undefined} */ Event.prototype.relatedTarget;
/** @type {number} */ Event.prototype.screenX;
/** @type {number} */ Event.prototype.screenY;
/** @type {boolean} */ Event.prototype.shiftKey;
/** @type {Window} */ Event.prototype.view;
/** @type {number} */ Event.prototype.which;
/** @constructor */ function nsIDOMPageTransitionEvent() {}
/** @type {boolean} */ nsIDOMPageTransitionEvent.prototype.persisted;
//Methods
Event.prototype.initKeyEvent;
Event.prototype.initMouseEvent;
Event.prototype.initUIEvent;
Event.prototype.initMessageEvent;
Event.prototype.preventBubble;
Event.prototype.preventCapture;

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2017 Semmle Ltd.
*/
/**
* @fileoverview More non-standard Gecko extensions.
* @externs
*/
/**
* Non-standard Gecko extension: XMLHttpRequest takes an optional parameter.
*
* @constructor
* @implements {EventTarget}
* @param {Object=} options
* @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#XMLHttpRequest%28%29
*/
function XMLHttpRequest(options) {}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over some of the
* W3C's XML specifications by Gecko. This file depends on
* w3c_xml.js. The whole file has been fully type annotated.
*
* @externs
*/
/**
* XMLSerializer can be used to convert DOM subtree or DOM document into text.
* XMLSerializer is available to unprivileged scripts.
*
* XMLSerializer is mainly useful for applications and extensions based on
* Mozilla platform. While it's available to web pages, it's not part of any
* standard and level of support in other browsers is unknown.
*
* @constructor
*/
function XMLSerializer() {}
/**
* Returns the serialized subtree in the form of a string
* @param {Node} subtree
* @return {string}
*/
XMLSerializer.prototype.serializeToString = function(subtree) {};
/**
* The subtree rooted by the specified element is serialized to a byte stream
* using the character set specified.
*
* @param {Node} subtree
* @return {Object}
*/
XMLSerializer.prototype.serializeToStream = function(subtree) {};
/**
* DOMParser is mainly useful for applications and extensions based on Mozilla
* platform. While it's available to web pages, it's not part of any standard and
* level of support in other browsers is unknown.
*
* @constructor
*/
function DOMParser() {}
/**
* The string passed in is parsed into a DOM document.
*
* Example:
* var parser = new DOMParser();
* var doc = parser.parseFromString(aStr, "text/xml");
*
* @param {string} src The UTF16 string to be parsed.
* @param {string} type The content type of the string.
* @return {Document}
*/
DOMParser.prototype.parseFromString = function(src, type) {};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,267 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for IE's custom CSS properties, as defined here:
* http://msdn.microsoft.com/en-us/library/aa768661(VS.85).aspx
*
* This page is also useful for the IDL definitions:
* http://source.winehq.org/source/include/mshtml.idl
*
* @externs
* @author nicksantos@google.com
*/
/** @type {Element} */
StyleSheet.prototype.owningElement;
/** @type {boolean} */
StyleSheet.prototype.readOnly;
/** @type {StyleSheetList} */
StyleSheet.prototype.imports;
/** @type {string} */
StyleSheet.prototype.id;
/**
* @param {string} bstrURL
* @param {number} lIndex
* @return {number}
*/
StyleSheet.prototype.addImport;
/**
* @param {string} bstrSelector
* @param {string} bstrStyle
* @param {number=} opt_iIndex
* @return {number}
* @see http://msdn.microsoft.com/en-us/library/aa358796%28v=vs.85%29.aspx
*/
StyleSheet.prototype.addRule;
/**
* @param {number} lIndex
*/
StyleSheet.prototype.removeImport;
/**
* @param {number} lIndex
*/
StyleSheet.prototype.removeRule;
/** @type {string} */
StyleSheet.prototype.cssText;
/** @type {CSSRuleList} */
StyleSheet.prototype.rules;
// StyleSheet methods
/**
* @param {string} propName
* @return {string}
* @see http://msdn.microsoft.com/en-us/library/aa358797(VS.85).aspx
*/
StyleSheet.prototype.getExpression;
/**
* @param {string} name
* @param {string} expression
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/ms531196(VS.85).aspx
*/
StyleSheet.prototype.setExpression;
/**
* @param {string} expression
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/aa358798(VS.85).aspx
*/
StyleSheet.prototype.removeExpression;
// IE-only CSS style names.
/** @type {string} */ CSSProperties.prototype.backgroundPositionX;
/** @type {string} */ CSSProperties.prototype.backgroundPositionY;
/**
* @see http://msdn.microsoft.com/en-us/library/ie/ms531081(v=vs.85).aspx
* NOTE: Left untyped to avoid conflict with caller.
*/
CSSProperties.prototype.behavior;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms533883.aspx
*/
CSSProperties.prototype.imeMode;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms534176(VS.85).aspx
*/
CSSProperties.prototype.msInterpolationMode;
/** @type {string} */ CSSProperties.prototype.overflowX;
/** @type {string} */ CSSProperties.prototype.overflowY;
/** @type {number} */ CSSProperties.prototype.pixelWidth;
/** @type {number} */ CSSProperties.prototype.pixelHeight;
/** @type {number} */ CSSProperties.prototype.pixelLeft;
/** @type {number} */ CSSProperties.prototype.pixelTop;
/** @type {string} */ CSSProperties.prototype.styleFloat;
/**
* @type {string|number}
* @see http://msdn.microsoft.com/en-us/library/ms535169(VS.85).aspx
*/
CSSProperties.prototype.zoom;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms535153(VS.85).aspx
*/
CSSProperties.prototype.writingMode;
/**
* IE-specific extensions.
* @see http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx
*/
/** @type {string} */
CSSProperties.prototype.MsAccelerator;
/** @type {string} */
CSSProperties.prototype.MsBackgroundPositionX;
/** @type {string} */
CSSProperties.prototype.MsBackgroundPositionY;
/** @type {string} */
CSSProperties.prototype.MsBehavior;
/** @type {string} */
CSSProperties.prototype.MsBlockProgression;
/** @type {string} */
CSSProperties.prototype.MsFilter;
/** @type {string} */
CSSProperties.prototype.MsImeMode;
/** @type {string} */
CSSProperties.prototype.MsLayoutGrid;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridChar;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridLine;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridMode;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridType;
/** @type {string} */
CSSProperties.prototype.MsLineBreak;
/** @type {string} */
CSSProperties.prototype.MsLineGridMode;
/** @type {string} */
CSSProperties.prototype.MsInterpolationMode;
/** @type {string} */
CSSProperties.prototype.MsOverflowX;
/** @type {string} */
CSSProperties.prototype.MsOverflowY;
/** @type {string} */
CSSProperties.prototype.MsScrollbar3dlightColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarArrowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarBaseColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarDarkshadowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarFaceColor;
CSSProperties.prototype.MsScrollbarHighlightColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarShadowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarTrackColor;
/** @type {string} */
CSSProperties.prototype.MsTextAlignLast;
/** @type {string} */
CSSProperties.prototype.MsTextAutospace;
/** @type {string} */
CSSProperties.prototype.MsTextJustify;
/** @type {string} */
CSSProperties.prototype.MsTextKashidaSpace;
/** @type {string} */
CSSProperties.prototype.MsTextOverflow;
/** @type {string} */
CSSProperties.prototype.MsTextUnderlinePosition;
/** @type {string} */
CSSProperties.prototype.MsWordBreak;
/** @type {string} */
CSSProperties.prototype.MsWordWrap;
/** @type {string} */
CSSProperties.prototype.MsWritingMode;
/** @type {string} */
CSSProperties.prototype.MsZoom;
// See: http://msdn.microsoft.com/en-us/library/windows/apps/Hh702466.aspx
/** @type {string} */
CSSProperties.prototype.msContentZooming;
/** @type {string} */
CSSProperties.prototype.msTouchAction;
/** @type {string} */
CSSProperties.prototype.msTransform;
/** @type {string} */
CSSProperties.prototype.msTransition;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,310 @@
/*
* Copyright 2008 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over the
* W3C's event specification by IE in JScript. This file depends on
* w3c_event.js.
*
* @see http://msdn.microsoft.com/en-us/library/ms535863.aspx
* @externs
*/
/** @type {string} */
Event.prototype.Abstract;
/** @type {boolean} */
Event.prototype.altLeft;
/** @type {string} */
Event.prototype.Banner;
/**
* A ClipboardData on IE, but a DataTransfer on WebKit.
* @see http://msdn.microsoft.com/en-us/library/ms535220.aspx
* @type {(ClipboardData|undefined)}
*/
Event.prototype.clipboardData;
/** @type {boolean} */
Event.prototype.contentOverflow;
/** @type {boolean} */
Event.prototype.ctrlLeft;
/** @type {string} */
Event.prototype.dataFld;
Event.prototype.domain;
/** @type {Element} */
Event.prototype.fromElement;
/** @type {string} */
Event.prototype.MoreInfo;
/** @type {string} */
Event.prototype.nextPage;
/** @type {number} */
Event.prototype.offsetX;
/** @type {number} */
Event.prototype.offsetY;
/** @type {string} */
Event.prototype.propertyName;
/** @type {string} */
Event.prototype.qualifier;
/** @type {number} */
Event.prototype.reason;
/** @type {Object<*>} */
Event.prototype.recordset;
/** @type {boolean} */
Event.prototype.repeat;
/** @type {(boolean|string|undefined)} */
Event.prototype.returnValue;
/** @type {string} */
Event.prototype.saveType;
Event.prototype.scheme;
/** @type {boolean} */
Event.prototype.shiftLeft;
/** @type {Window} */
Event.prototype.source;
/** @type {Element} */
Event.prototype.srcElement;
Event.prototype.srcFilter;
/** @type {string} */
Event.prototype.srcUrn;
/** @type {Element} */
Event.prototype.toElement;
Event.prototype.userName;
/** @type {number} */
Event.prototype.wheelDelta;
/** @type {number} */
Event.prototype.x;
/** @type {number} */
Event.prototype.y;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441257.aspx
*/
function MSPointerPoint() {}
/** @type {number} */
MSPointerPoint.prototype.pointerId;
/** @type {number} */
MSPointerPoint.prototype.pointerType;
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441233.aspx
*/
function MSPointerEvent() {}
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_MOUSE;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_PEN;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_TOUCH;
/** @type {number} */
MSPointerEvent.prototype.height;
/** @type {number} */
MSPointerEvent.prototype.hwTimestamp;
/** @type {boolean} */
MSPointerEvent.prototype.isPrimary;
/** @type {number} */
MSPointerEvent.prototype.pointerId;
/** @type {number} */
MSPointerEvent.prototype.pointerType;
/** @type {number} */
MSPointerEvent.prototype.pressure;
/** @type {number} */
MSPointerEvent.prototype.rotation;
/** @type {number} */
MSPointerEvent.prototype.tiltX;
/** @type {number} */
MSPointerEvent.prototype.tiltY;
/** @type {number} */
MSPointerEvent.prototype.timeStamp;
/** @type {number} */
MSPointerEvent.prototype.width;
/**
* @param {number} pointerId
* @return {undefined}
*/
MSPointerEvent.prototype.msReleasePointerCapture;
/**
* @param {number} pointerId
* @return {undefined}
*/
MSPointerEvent.prototype.msSetPointerCapture;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {boolean} ctrlKeyArg
* @param {boolean} altKeyArg
* @param {boolean} shiftKeyArg
* @param {boolean} metaKeyArg
* @param {number} buttonArg
* @param {Element} relatedTargetArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} widthArg
* @param {number} heightArg
* @param {number} pressure
* @param {number} rotation
* @param {number} tiltX
* @param {number} tiltY
* @param {number} pointerIdArg
* @param {number} pointerType
* @param {number} hwTimestampArg
* @param {boolean} isPrimary
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441246.aspx
*/
MSPointerEvent.prototype.initPointerEvent;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/ie/hh968249(v=vs.85).aspx
*/
function MSGesture() {}
/**
* @type {Element}
*/
MSGesture.prototype.target;
/**
* @param {number} pointerId
* @return {undefined}
*/
MSGesture.prototype.addPointer = function(pointerId) {};
MSGesture.prototype.stop = function() {};
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/ie/hh772076(v=vs.85).aspx
*/
function MSGestureEvent() {}
/** @type {number} */
MSGestureEvent.prototype.expansion;
/** @type {!MSGesture} */
MSGestureEvent.prototype.gestureObject;
/** @type {number} */
MSGestureEvent.prototype.hwTimestamp;
/** @type {number} */
MSGestureEvent.prototype.rotation;
/** @type {number} */
MSGestureEvent.prototype.scale;
/** @type {number} */
MSGestureEvent.prototype.translationX;
/** @type {number} */
MSGestureEvent.prototype.translationY;
/** @type {number} */
MSGestureEvent.prototype.velocityAngular;
/** @type {number} */
MSGestureEvent.prototype.velocityExpansion;
/** @type {number} */
MSGestureEvent.prototype.velocityX;
/** @type {number} */
MSGestureEvent.prototype.velocityY;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} translationXArg
* @param {number} translationYArg
* @param {number} scaleArg
* @param {number} expansionArg
* @param {number} rotationArg
* @param {number} velocityXArg
* @param {number} velocityYArg
* @param {number} velocityExpansionArg
* @param {number} velocityAngularArg
* @param {number} hwTimestampArg
* @param {EventTarget} relatedTargetArg
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441187.aspx
*/
MSGestureEvent.prototype.initGestureEvent;

View File

@@ -0,0 +1,77 @@
/*
* Copyright 2009 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for IE's vector markup language, or VML.
*
* @externs
* @author robbyw@google.com (Robby Walker)
*/
/**
* @type {Object|string}
* @see http://msdn.microsoft.com/en-us/library/bb263836(VS.85).aspx
*/
Element.prototype.coordorigin;
/**
* @type {Object|string}
* @see http://msdn.microsoft.com/en-us/library/bb263837(VS.85).aspx
*/
Element.prototype.coordsize;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263839(VS.85).aspx
*/
Element.prototype.fillcolor;
/**
* @type {boolean}
* @see http://msdn.microsoft.com/en-us/library/bb263840(VS.85).aspx
*/
Element.prototype.filled;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263871(VS.85).aspx
*/
Element.prototype.path;
/**
* @type {number|string}
* @see http://msdn.microsoft.com/en-us/library/bb263877(VS.85).aspx
*/
Element.prototype.rotation;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263881(VS.85).aspx
*/
Element.prototype.strokecolor;
/**
* @type {boolean}
* @see http://msdn.microsoft.com/en-us/library/bb263882(VS.85).aspx
*/
Element.prototype.stroked;
/**
* @type {number|string}
* @see http://msdn.microsoft.com/en-us/library/bb263883(VS.85).aspx
*/
Element.prototype.strokeweight;

View File

@@ -0,0 +1,167 @@
/*
* Copyright 2013 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the JS Internationalization API as defined in
* http://www.ecma-international.org/ecma-402/1.0/
*
* @externs
*/
/** @const */
var Intl = {};
/**
* NOTE: this API is not from ecma402 and is subject to change.
* @param {string|Array<string>=} opt_locales
* @param {{type: (string|undefined)}=}
* opt_options
* @constructor
*/
Intl.v8BreakIterator = function(opt_locales, opt_options) {};
/**
* @param {string} text
* @return {undefined}
*/
Intl.v8BreakIterator.prototype.adoptText = function(text) {};
/**
* @return {string}
*/
Intl.v8BreakIterator.prototype.breakType = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.current = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.first = function() {};
/**
* @return {number}
*/
Intl.v8BreakIterator.prototype.next = function() {};
/**
* @constructor
* @param {string|Array<string>=} opt_locales
* @param {{usage: (string|undefined), localeMatcher: (string|undefined),
* sensitivity: (string|undefined), ignorePunctuation: (boolean|undefined),
* numeric: (boolean|undefined), caseFirst: (string|undefined)}=}
* opt_options
*/
Intl.Collator = function(opt_locales, opt_options) {};
/**
* @param {Array<string>} locales
* @param {{localeMatcher: (string|undefined)}=} opt_options
* @return {Array<string>}
*/
Intl.Collator.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {string} arg1
* @param {string} arg2
* @return {number}
*/
Intl.Collator.prototype.compare = function(arg1, arg2) {};
/**
* @return {{locale: string, usage: string, sensitivity: string,
* ignorePunctuation: boolean, collation: string, numeric: boolean,
* caseFirst: string}}
*/
Intl.Collator.prototype.resolvedOptions = function() {};
/**
* @constructor
* @param {string|Array<string>=} opt_locales
* @param {{localeMatcher: (string|undefined), useGrouping: (boolean|undefined),
* numberingSystem: (string|undefined), style: (string|undefined),
* currency: (string|undefined), currencyDisplay: (string|undefined),
* minimumIntegerDigits: (number|undefined),
* minimumFractionDigits: (number|undefined),
* maximumFractionDigits: (number|undefined),
* minimumSignificantDigits: (number|undefined),
* maximumSignificantDigits: (number|undefined)}=}
* opt_options
*/
Intl.NumberFormat = function(opt_locales, opt_options) {};
/**
* @param {Array<string>} locales
* @param {{localeMatcher: (string|undefined)}=} opt_options
* @return {Array<string>}
*/
Intl.NumberFormat.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {number} num
* @return {string}
*/
Intl.NumberFormat.prototype.format = function(num) {};
/**
* @return {{locale: string, numberingSystem: string, style: string,
* currency: (string|undefined), currencyDisplay: (string|undefined),
* minimumIntegerDigits: number, minimumFractionDigits: number,
* maximumFractionDigits: number, minimumSignificantDigits: number,
* maximumSignificantDigits: number, useGrouping: boolean}}
*/
Intl.NumberFormat.prototype.resolvedOptions = function() {};
/**
* @constructor
* @param {string|Array<string>=} opt_locales
* @param {{localeMatcher: (string|undefined),
* formatMatcher: (string|undefined), calendar: (string|undefined),
* numberingSystem: (string|undefined), tz: (string|undefined),
* weekday: (string|undefined), era: (string|undefined),
* year: (string|undefined), month: (string|undefined),
* day: (string|undefined), hour: (string|undefined),
* minute: (string|undefined), second: (string|undefined),
* timeZoneName: (string|undefined), hour12: (boolean|undefined)}=}
* opt_options
*/
Intl.DateTimeFormat = function(opt_locales, opt_options) {};
/**
* @param {Array<string>} locales
* @param {{localeMatcher: string}=} opt_options
* @return {Array<string>}
*/
Intl.DateTimeFormat.supportedLocalesOf = function(locales, opt_options) {};
/**
* @param {(!Date|number)=} date
* @return {string}
*/
Intl.DateTimeFormat.prototype.format = function(date) {};
/**
* @return {{locale: string, calendar: string, numberingSystem: string,
* timeZone: (string|undefined), weekday: (string|undefined),
* era: (string|undefined), year: (string|undefined),
* month: (string|undefined), day: (string|undefined),
* hour: (string|undefined), minute: (string|undefined),
* second: (string|undefined), timeZoneName: (string|undefined),
* hour12: (boolean|undefined)}}
*/
Intl.DateTimeFormat.prototype.resolvedOptions = function() {};

View File

@@ -0,0 +1,204 @@
/*
* Copyright 2009 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all iPhone extensions. Created from:
* http://developer.apple.com/library/safari/navigation/
*
* @externs
* @author agrieve@google.com (Andrew Grieve)
*/
/**
* @type {number}
*/
Touch.prototype.webkitForce;
/**
* @type {number}
*/
Touch.prototype.webkitRadiusX;
/**
* @type {number}
*/
Touch.prototype.webkitRadiusY;
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
TouchEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
TouchEvent.prototype.rotation;
/**
* Initializes a newly created TouchEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {TouchList} touches
* @param {TouchList} targetTouches
* @param {TouchList} changedTouches
* @param {number} scale
* @param {number} rotation
* @return {undefined}
*/
TouchEvent.prototype.initTouchEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, touches, targetTouches, changedTouches, scale, rotation) {};
/**
* The GestureEvent class encapsulates information about a multi-touch gesture.
*
* GestureEvent objects are high-level events that encapsulate the low-level
* TouchEvent objects. Both GestureEvent and TouchEvent events are sent during
* a multi-touch sequence. Gesture events contain scaling and rotation
* information allowing gestures to be combined, if supported by the platform.
* If not supported, one gesture ends before another starts. Listen for
* GestureEvent events if you want to respond to gestures only, not process
* the low-level TouchEvent objects.
*
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html
* @extends {UIEvent}
* @constructor
*/
function GestureEvent() {}
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
GestureEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
GestureEvent.prototype.rotation;
/**
* The target of this gesture.
* @type {EventTarget}
*/
GestureEvent.prototype.target;
/**
* Initializes a newly created GestureEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {EventTarget} target
* @param {number} scale
* @param {number} rotation
* @return {undefined}
*/
GestureEvent.prototype.initGestureEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, target, scale, rotation) {};
/**
* Specifies the JavaScript method to invoke when a gesture is started by
* two or more fingers touching the surface.
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongesturestart;
/**
* Specifies the JavaScript method to invoke when fingers are moved during a
* gesture.
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongesturechange;
/**
* Specifies the JavaScript method to invoke when a gesture ends (when there are
* 0 or 1 fingers touching the surface).
* @type {?function(!GestureEvent)}
*/
Element.prototype.ongestureend;
/**
* Specifies the JavaScript method to invoke when the browser device's
* orientation changes, i.e.the device is rotated.
* @type {?function(!Event)}
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.onorientationchange;
/**
* Returns the orientation of the browser's device, one of [-90, 0, 90, 180].
* @type {number}
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.orientation;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocapitalize;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocapitalize;

View File

@@ -0,0 +1,171 @@
/*
* Copyright 2012 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the Media Source Extensions. Note that the
* properties available here are the union of several versions of the spec.
* @see http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
*
* @externs
*/
/**
* @constructor
* @implements {EventTarget}
*/
function MediaSource() {}
/**
* @param {boolean=} opt_useCapture
* @override
* @return {undefined}
*/
MediaSource.prototype.addEventListener = function(
type, listener, opt_useCapture) {};
/**
* @param {boolean=} opt_useCapture
* @override
* @return {undefined}
*/
MediaSource.prototype.removeEventListener = function(
type, listener, opt_useCapture) {};
/**
* @override
* @return {boolean}
*/
MediaSource.prototype.dispatchEvent = function(evt) {};
/** @type {Array<SourceBuffer>} */
MediaSource.prototype.sourceBuffers;
/** @type {Array<SourceBuffer>} */
MediaSource.prototype.activeSourceBuffers;
/** @type {number} */
MediaSource.prototype.duration;
/**
* @param {string} type
* @return {SourceBuffer}
*/
MediaSource.prototype.addSourceBuffer = function(type) {};
/**
* @param {SourceBuffer} sourceBuffer
* @return {undefined}
*/
MediaSource.prototype.removeSourceBuffer = function(sourceBuffer) {};
/**
* Updates the live seekable range.
* @param {number} start
* @param {number} end
*/
MediaSource.prototype.setLiveSeekableRange = function(start, end) {};
/**
* Clears the live seekable range.
* @return {void}
*/
MediaSource.prototype.clearLiveSeekableRange = function() {};
/** @type {string} */
MediaSource.prototype.readyState;
/**
* @param {string=} opt_error
* @return {undefined}
*/
MediaSource.prototype.endOfStream = function(opt_error) {};
/**
* @param {string} type
* @return {boolean}
*/
MediaSource.isTypeSupported = function(type) {};
/**
* @constructor
* @implements {EventTarget}
*/
function SourceBuffer() {}
/**
* @param {boolean=} opt_useCapture
* @override
* @return {undefined}
*/
SourceBuffer.prototype.addEventListener = function(
type, listener, opt_useCapture) {};
/**
* @param {boolean=} opt_useCapture
* @override
* @return {undefined}
*/
SourceBuffer.prototype.removeEventListener = function(
type, listener, opt_useCapture) {};
/**
* @override
* @return {boolean}
*/
SourceBuffer.prototype.dispatchEvent = function(evt) {};
/** @type {string} */
SourceBuffer.prototype.appendMode;
/** @type {boolean} */
SourceBuffer.prototype.updating;
/** @type {TimeRanges} */
SourceBuffer.prototype.buffered;
/** @type {number} */
SourceBuffer.prototype.timestampOffset;
/** @type {number} */
SourceBuffer.prototype.appendWindowStart;
/** @type {number} */
SourceBuffer.prototype.appendWindowEnd;
/**
* @param {Uint8Array} data
* @return {undefined}
*/
SourceBuffer.prototype.append = function(data) {};
/**
* @param {ArrayBuffer|ArrayBufferView} data
* @return {undefined}
*/
SourceBuffer.prototype.appendBuffer = function(data) {};
/**
* Abort the current segment append sequence.
* @return {undefined}
*/
SourceBuffer.prototype.abort = function() {};
/**
* @param {number} start
* @param {number} end
* @return {undefined}
*/
SourceBuffer.prototype.remove = function(start, end) {};

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2015 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for Page Visibility.
*
* @see http://www.w3.org/TR/page-visibility
* @externs
*/
/**
* Set of possible values: 'hidden', 'visible', 'prerender', 'unloaded'.
* @typedef {string}
* @see http://www.w3.org/TR/page-visibility/#VisibilityState
*/
var VisibilityState;

View File

@@ -0,0 +1,465 @@
/*
* Copyright 2015 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Streams API definitions
*
* Based on Living Standard — Last Updated 5 August 2016
* https://streams.spec.whatwg.org/commit-snapshots/34ecaadbcce8df9943d7a2cdb7fca4dc25914df4/
*
* @see https://streams.spec.whatwg.org/
* @externs
*/
/** @typedef {{ value:*, done:boolean }} */
var IteratorResult;
/**
* @typedef {!CountQueuingStrategy|!ByteLengthQueuingStrategy|{
* size: (undefined|function(*): number),
* highWaterMark: number
* }}
*/
var QueuingStrategy;
/**
* @record
*/
function TransformStream() {};
/** @type {!WritableStream} */
TransformStream.prototype.writable;
/** @type {!ReadableStream} */
TransformStream.prototype.readable;
/**
* @record
*/
function PipeOptions() {};
/** @type {undefined|boolean} */
PipeOptions.prototype.preventClose;
/** @type {undefined|boolean} */
PipeOptions.prototype.preventAbort;
/** @type {undefined|boolean} */
PipeOptions.prototype.preventCancel;
/**
* @record
*/
function ReadableStreamSource() {};
/**
* @type {(undefined|
* function((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!IThenable<*>|undefined))}
*/
ReadableStreamSource.prototype.start;
/**
* @type {(undefined|
* function((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!IThenable<*>|undefined))}
*/
ReadableStreamSource.prototype.pull;
/** @type {(undefined|function(*):(!Promise<*>|undefined))} */
ReadableStreamSource.prototype.cancel;
/** @type {(undefined|string)} */
ReadableStreamSource.prototype.type;
/** @type {(undefined|number)} */
ReadableStreamSource.prototype.autoAllocateChunkSize;
/**
* @param {!ReadableStreamSource=} opt_underlyingSource
* @param {!QueuingStrategy=} opt_queuingStrategy
* @constructor
* @see https://streams.spec.whatwg.org/#rs-class
*/
function ReadableStream(opt_underlyingSource, opt_queuingStrategy) {};
/**
* @type {boolean}
* @see https://streams.spec.whatwg.org/#rs-locked
*/
ReadableStream.prototype.locked;
/**
* @param {*} reason
* @return {!Promise<void>}
* @see https://streams.spec.whatwg.org/#rs-cancel
*/
ReadableStream.prototype.cancel = function(reason) {};
/**
* @param {{ mode:(undefined|string) }=} opt_options
* @return {(!ReadableStreamDefaultReader|!ReadableStreamBYOBReader)}
* @see https://streams.spec.whatwg.org/#rs-get-reader
*/
ReadableStream.prototype.getReader = function(opt_options) {};
/**
* @param {!TransformStream} transform
* @param {!PipeOptions=} opt_options
* @return {!ReadableStream}
* @see https://streams.spec.whatwg.org/#rs-pipe-through
*/
ReadableStream.prototype.pipeThrough = function(transform, opt_options) {};
/**
* @param {!WritableStream} dest
* @param {!PipeOptions=} opt_options
* @return {!Promise<void>}
* @see https://streams.spec.whatwg.org/#rs-pipe-to
*/
ReadableStream.prototype.pipeTo = function(dest, opt_options) {};
/**
* @return {!Array<!ReadableStream>}
* @see https://streams.spec.whatwg.org/#rs-tee
*/
ReadableStream.prototype.tee = function() {};
/**
* The ReadableStreamDefaultReader constructor is generally not meant to be used directly;
* instead, a streams getReader() method should be used.
*
* @interface
* @see https://streams.spec.whatwg.org/#default-reader-class
*/
function ReadableStreamDefaultReader() {};
/**
* @type {!Promise<void>}
* @see https://streams.spec.whatwg.org/#default-reader-closed
*/
ReadableStreamDefaultReader.prototype.closed;
/**
* @param {*} reason
* @return {!Promise<*>}
* @see https://streams.spec.whatwg.org/#default-reader-cancel
*/
ReadableStreamDefaultReader.prototype.cancel = function(reason) {};
/**
* @return {!Promise<!IteratorResult>}
* @see https://streams.spec.whatwg.org/#default-reader-read
*/
ReadableStreamDefaultReader.prototype.read = function() {};
/**
* @return {undefined}
* @see https://streams.spec.whatwg.org/#default-reader-release-lock
*/
ReadableStreamDefaultReader.prototype.releaseLock = function() {};
/**
* The ReadableStreamBYOBReader constructor is generally not meant to be used
* directly; instead, a streams getReader() method should be used.
*
* @interface
* @see https://streams.spec.whatwg.org/#byob-reader-class
*/
function ReadableStreamBYOBReader() {};
/**
* @type {!Promise<void>}
* @see https://streams.spec.whatwg.org/#byob-reader-closed
*/
ReadableStreamBYOBReader.prototype.closed;
/**
* @param {*} reason
* @return {!Promise<*>}
* @see https://streams.spec.whatwg.org/#byob-reader-cancel
*/
ReadableStreamBYOBReader.prototype.cancel = function(reason) {};
/**
* @param {!ArrayBufferView} view
* @return {!Promise<!IteratorResult>}
* @see https://streams.spec.whatwg.org/#byob-reader-read
*/
ReadableStreamBYOBReader.prototype.read = function(view) {};
/**
* @return {undefined}
* @see https://streams.spec.whatwg.org/#byob-reader-release-lock
*/
ReadableStreamBYOBReader.prototype.releaseLock = function() {};
/**
* The ReadableStreamDefaultController constructor cannot be used directly;
* it only works on a ReadableStream that is in the middle of being constructed.
*
* @interface
* @see https://streams.spec.whatwg.org/#rs-default-controller-class
*/
function ReadableStreamDefaultController() {};
/**
* @type {number}
* @see https://streams.spec.whatwg.org/#rs-default-controller-desired-size
*/
ReadableStreamDefaultController.prototype.desiredSize;
/**
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rs-default-controller-close
*/
ReadableStreamDefaultController.prototype.close = function() {};
/**
* @param {*} chunk
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rs-default-controller-enqueue
*/
ReadableStreamDefaultController.prototype.enqueue = function(chunk) {};
/**
* @param {*} err
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rs-default-controller-error
*/
ReadableStreamDefaultController.prototype.error = function(err) {};
/**
* The ReadableByteStreamController constructor cannot be used directly;
* it only works on a ReadableStream that is in the middle of being constructed.
*
* @interface
* @see https://streams.spec.whatwg.org/#rbs-controller-class
*/
function ReadableByteStreamController() {};
/**
* @type {!ReadableStreamBYOBRequest}
* @see https://streams.spec.whatwg.org/#rbs-controller-byob-request
*/
ReadableByteStreamController.prototype.byobRequest;
/**
* @type {number}
* @see https://streams.spec.whatwg.org/#rbs-controller-desired-size
*/
ReadableByteStreamController.prototype.desiredSize;
/**
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rbs-controller-close
*/
ReadableByteStreamController.prototype.close = function() {};
/**
* @param {!ArrayBufferView} chunk
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rbs-controller-enqueue
*/
ReadableByteStreamController.prototype.enqueue = function(chunk) {};
/**
* @param {*} err
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rbs-controller-error
*/
ReadableByteStreamController.prototype.error = function(err) {};
/**
* @interface
* @see https://streams.spec.whatwg.org/#rs-byob-request-class
*/
function ReadableStreamBYOBRequest() {};
/**
* @type {!ArrayBufferView}
* @see https://streams.spec.whatwg.org/#rs-byob-request-view
*/
ReadableStreamBYOBRequest.prototype.view;
/**
* @param {number} bytesWritten
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rs-byob-request-respond
*/
ReadableStreamBYOBRequest.prototype.respond = function(bytesWritten) {};
/**
* @param {!ArrayBufferView} view
* @return {undefined}
* @see https://streams.spec.whatwg.org/#rs-byob-request-respond-with-new-view
*/
ReadableStreamBYOBRequest.prototype.respondWithNewView = function(view) {};
/**
* @record
*/
function WritableStreamSink() {};
/** @type {(undefined|function(!WritableStreamDefaultController):(!IThenable<*>|undefined))}*/
WritableStreamSink.prototype.start;
/** @type {(undefined|function(!WritableStreamDefaultController):(!IThenable<*>|undefined))}*/
WritableStreamSink.prototype.write;
/** @type {(undefined|function():(!IThenable<*>|undefined))} */
WritableStreamSink.prototype.close;
/** @type {(undefined|function(*):(!IThenable<*>|undefined))} */
WritableStreamSink.prototype.abort;
/**
* @param {!WritableStreamSink=} opt_underlyingSink
* @param {!QueuingStrategy=} opt_queuingStrategy
* @constructor
* @see https://streams.spec.whatwg.org/#ws-class
*/
function WritableStream(opt_underlyingSink, opt_queuingStrategy) {};
/**
* @type {boolean}
* @see https://streams.spec.whatwg.org/#ws-locked
*/
WritableStream.prototype.locked;
/**
* @param {*} reason
* @return {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#ws-abort
*/
WritableStream.prototype.abort = function(reason) {};
/**
* @return {!WritableStreamDefaultWriter}
* @see https://streams.spec.whatwg.org/#ws-get-writer
*/
WritableStream.prototype.getWriter = function() {};
/**
* @interface
* @see https://streams.spec.whatwg.org/#default-writer-class
*/
function WritableStreamDefaultWriter() {};
/**
* @type {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#default-writer-closed
*/
WritableStreamDefaultWriter.prototype.closed;
/**
* @type {number}
* @see https://streams.spec.whatwg.org/#default-writer-desiredSize
*/
WritableStreamDefaultWriter.prototype.desiredSize;
/**
* @type {!Promise<number>}
* @see https://streams.spec.whatwg.org/#default-writer-ready
*/
WritableStreamDefaultWriter.prototype.ready;
/**
* @param {*} reason
* @return {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#default-writer-abort
*/
WritableStreamDefaultWriter.prototype.abort = function(reason) {};
/**
* @return {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#default-writer-close
*/
WritableStreamDefaultWriter.prototype.close = function() {};
/**
* @return {undefined}
* @see https://streams.spec.whatwg.org/#default-writer-release-lock
*/
WritableStreamDefaultWriter.prototype.releaseLock = function() {};
/**
* @param {*} chunk
* @return {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#default-writer-write
*/
WritableStreamDefaultWriter.prototype.write = function(chunk) {};
/**
* The WritableStreamDefaultController constructor cannot be used directly;
* it only works on a WritableStream that is in the middle of being constructed.
*
* @interface
* @see https://streams.spec.whatwg.org/#ws-default-controller-class
*/
function WritableStreamDefaultController() {};
/**
* @param {*} err
* @return {!Promise<undefined>}
* @see https://streams.spec.whatwg.org/#ws-default-controller-error
*/
WritableStreamDefaultController.prototype.error = function(err) {};
/**
* @param {{ highWaterMark:number }} config
* @constructor
* @see https://streams.spec.whatwg.org/#blqs-class
*/
function ByteLengthQueuingStrategy(config) {}
/**
* If we don't want to be strict we can define chunk as {*}
* and return as {number|undefined}
*
* @param {{ byteLength:number }} chunk
* @return {number}
* @see https://streams.spec.whatwg.org/#blqs-size
*/
ByteLengthQueuingStrategy.prototype.size = function(chunk) {};
/**
* @param {{ highWaterMark:number }} config
* @constructor
* @see https://streams.spec.whatwg.org/#cqs-class
*/
function CountQueuingStrategy(config) {}
/**
* @param {*} chunk
* @return {number}
* @see https://streams.spec.whatwg.org/#cqs-size
*/
CountQueuingStrategy.prototype.size = function(chunk) {};

View File

@@ -0,0 +1,144 @@
/*
* Copyright 2015 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for URL and URLSearchParams from the spec at
* https://url.spec.whatwg.org.
*
* @externs
* @author rdcronin@google.com (Devlin Cronin)
*/
/**
* @constructor
* @implements {Iterable<!Array<string>>}
* @param {(string|!URLSearchParams)=} init
*/
function URLSearchParams(init) {}
/**
* @param {string} name
* @param {string} value
* @return {undefined}
*/
URLSearchParams.prototype.append = function(name, value) {};
/**
* @param {string} name
* @return {undefined}
*/
URLSearchParams.prototype.delete = function(name) {};
/**
* @param {string} name
* @return {?string}
*/
URLSearchParams.prototype.get = function(name) {};
/**
* @param {string} name
* @return {!Array<string>}
*/
URLSearchParams.prototype.getAll = function(name) {};
/**
* @param {string} name
* @return {boolean}
*/
URLSearchParams.prototype.has = function(name) {};
/**
* @param {string} name
* @param {string} value
* @return {undefined}
*/
URLSearchParams.prototype.set = function(name, value) {};
/**
* @see https://url.spec.whatwg.org
* @constructor
* @param {string} url
* @param {(string|!URL)=} base
*/
function URL(url, base) {}
/** @type {string} */
URL.prototype.href;
/**
* @const
* @type {string}
*/
URL.prototype.origin;
/** @type {string} */
URL.prototype.protocol;
/** @type {string} */
URL.prototype.username;
/** @type {string} */
URL.prototype.password;
/** @type {string} */
URL.prototype.host;
/** @type {string} */
URL.prototype.hostname;
/** @type {string} */
URL.prototype.port;
/** @type {string} */
URL.prototype.pathname;
/** @type {string} */
URL.prototype.search;
/**
* @const
* @type {URLSearchParams}
*/
URL.prototype.searchParams;
/** @type {string} */
URL.prototype.hash;
/**
* @param {string} domain
* @return {string}
*/
URL.domainToASCII = function(domain) {};
/**
* @param {string} domain
* @return {string}
*/
URL.domainToUnicode = function(domain) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
* @param {!File|!Blob|!MediaSource|!MediaStream} obj
* @return {string}
*/
URL.createObjectURL = function(obj) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
* @param {string} url
* @return {undefined}
*/
URL.revokeObjectURL = function(url) {};

Some files were not shown because too many files have changed in this diff Show More