Home
last modified time | relevance | path

Searched full:ts (Results 1 – 25 of 1770) sorted by relevance

12345678910>>...71

/arkcompiler/ets_frontend/testTs/
Dskip_tests.json3 "./testTs/test/fixSignatureCaching.ts",
4 "./testTs/test/scanner/ecmascript3/scannerES3NumericLiteral6.ts",
5 "./testTs/test/scanner/ecmascript3/scannerES3NumericLiteral4.ts",
6 "./testTs/test/scanner/ecmascript3/scannerES3NumericLiteral3.ts",
7 "./testTs/test/scanner/ecmascript5/scannerNumericLiteral6.ts",
8 "./testTs/test/scanner/ecmascript5/scannerNumericLiteral4.ts",
9 "./testTs/test/scanner/ecmascript5/scannerUnicodeEscapeInKeyword1.ts",
10 "./testTs/test/scanner/ecmascript5/scannertest1.ts",
11 "./testTs/test/scanner/ecmascript5/scannerS7.8.3_A6.1_T1.ts",
12 "./testTs/test/scanner/ecmascript5/scannerS7.4_A2_T2.ts",
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/
DTypeScriptLinterConfig.ts16 import * as ts from 'typescript';
38 const keys = Object.keys(ts.SyntaxKind);
39 const values = Object.values(ts.SyntaxKind);
51 static terminalTokens: Set<ts.SyntaxKind> = new Set([
52 ts.SyntaxKind.CloseBracketToken,
53 ts.SyntaxKind.OpenBracketToken,
54 ts.SyntaxKind.CloseParenToken,
55 ts.SyntaxKind.OpenParenToken,
56 ts.SyntaxKind.CloseBraceToken,
57 ts.SyntaxKind.OpenBraceToken,
[all …]
DTypeScriptLinter.ts17 import * as ts from 'typescript';
87 private fileExportDeclCaches: Set<ts.Node> | undefined;
89 private sourceFile?: ts.SourceFile;
104 const etsComponentExpression: ts.SyntaxKind | undefined = ts.SyntaxKind.EtsComponentExpression;
118 private readonly tsTypeChecker: ts.TypeChecker,
120 private readonly tscStrictDiagnostics?: Map<string, ts.Diagnostic[]>
133 [ts.SyntaxKind.ObjectLiteralExpression, this.handleObjectLiteralExpression],
134 [ts.SyntaxKind.ArrayLiteralExpression, this.handleArrayLiteralExpression],
135 [ts.SyntaxKind.Parameter, this.handleParameter],
136 [ts.SyntaxKind.EnumDeclaration, this.handleEnumDeclaration],
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/utils/consts/
DStandardLibraries.ts17 'lib.es5.d.ts',
18 'lib.es2015.iterable.d.ts',
19 'lib.es2015.generator.d.ts',
20 'lib.es2015.proxy.d.ts',
21 'lib.es2015.promise.d.ts',
22 'lib.es2015.symbol.wellknown.d.ts',
23 'lib.es2015.symbol.d.ts',
24 'lib.es2015.reflect.d.ts',
25 'lib.es2015.collection.d.ts',
26 'lib.es2015.core.d.ts',
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/scripts/
Dbundle-ts-lib-declarations.mjs21 'lib.d.ts',
22 'lib.dom.iterable.d.ts',
23 'lib.dom.d.ts',
24 'lib.es2015.symbol.wellknown.d.ts',
25 'lib.es2015.symbol.d.ts',
26 'lib.es2015.reflect.d.ts',
27 'lib.es2015.proxy.d.ts',
28 'lib.es2015.promise.d.ts',
29 'lib.es2015.iterable.d.ts',
30 'lib.es2015.generator.d.ts',
[all …]
/arkcompiler/ets_frontend/arkguard/test/ut/transformer/
DRenameIdentifierTransformer.spec.ts27 import * as ts from 'typescript';
93 import {A as B} from './file1.ts';
94 export {C as D} from './file1.ts';
96 let transformer: ts.TransformerFactory<ts.Node>;
118 …const sourceFile: ts.SourceFile = ts.createSourceFile('demo.ts', fileContent, ts.ScriptTarget.ES20…
119 let transformed = ts.transform(sourceFile, [transformer]);
122 .transformed[0] as ts.SourceFile)
123 .statements[0] as ts.ClassDeclaration)
124 .members[1] as ts.ConstructorDeclaration)
126 .name as ts.Identifier)
[all …]
DDisableConsoleTransformer.spec.ts21 import ts from 'typescript';
44 const blockNode: ts.Block = ts.factory.createBlock([]);
45 …let transformedResult: ts.TransformationResult<ts.Node> = ts.transform(blockNode, [disableConsoleF…
60 …const sourceFile: ts.SourceFile = ts.createSourceFile('demo.ts', fileContent, ts.ScriptTarget.ES20…
61 …let transformedResult: ts.TransformationResult<ts.Node> = ts.transform(sourceFile, [disableConsole…
62 …assert.strictEqual((((transformedResult.transformed[0] as ts.SourceFile).statements[0] as ts.Funct…
77 …const sourceFile: ts.SourceFile = ts.createSourceFile('demo.ts', fileContent, ts.ScriptTarget.ES20…
78 …let transformedResult: ts.TransformationResult<ts.Node> = ts.transform(sourceFile, [disableConsole…
81 .transformed[0] as ts.SourceFile)
82 .statements[0] as ts.FunctionDeclaration)
[all …]
/arkcompiler/ets_frontend/arkguard/test/ut/utils/
DKeepParameterUtils.spec.ts16 import ts from 'typescript';
28 let path = '/user/local/tester.d.ts';
30 const ast = ts.createSourceFile(path, content, ts.ScriptTarget.ES2015, true);
46 let path = '/user/local/tester.d.ts';
48 const ast = ts.createSourceFile(path, content, ts.ScriptTarget.ES2015, true);
64 let path = '/user/local/tester.ts';
66 const ast = ts.createSourceFile(path, content, ts.ScriptTarget.ES2015, true);
86 path = '/user/local/tester.d.ts';
100 const ast = ts.createSourceFile(path, content, ts.ScriptTarget.ES2015, true);
101 let node: ts.Identifier = undefined;
[all …]
DNodeUtils.spec.ts19 import * as ts from 'typescript'
29 const node = ts.factory.createIdentifier('name');
33 const node = ts.factory.createIdentifier('name');
34 … const parent = ts.factory.createPropertyAssignment(node, ts.factory.createNumericLiteral('1'));
35 (node as Mutable<ts.Node>).parent = parent;
39 const node = ts.factory.createIdentifier('name');
40 const parent = ts.factory.createComputedPropertyName(node);
41 (node as Mutable<ts.Node>).parent = parent;
45 const node = ts.factory.createIdentifier('name');
46 const parent = ts.factory.createBindingElement(undefined, node, 'bindingElement');
[all …]
DOhsUtil.spec.ts34 import * as ts from 'typescript';
41 describe('unit test for OhsUtil.ts', function () {
49 … const classNode = ts.factory.createClassDeclaration(undefined, "Class", undefined, undefined, []);
58 … const heritageClause = ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, undefined);
59 …const classNode = ts.factory.createClassDeclaration(undefined, "Class", undefined, [heritageClause…
64 … const heritageClause = ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [undefined]);
65 …const classNode = ts.factory.createClassDeclaration(undefined, "Class", undefined, [heritageClause…
71 ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword),
73 …const type = ts.factory.createExpressionWithTypeArguments(ts.factory.createIdentifier('ViewPU'), t…
74 const heritageClause = ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [type]);
[all …]
/arkcompiler/ets_frontend/es2panda/test/
Dtest_tsc_ignore_list.txt1 es2panda/test/TypeScript/tests/cases/compiler/bom-utf16be.ts
2 es2panda/test/TypeScript/tests/cases/compiler/collisionArgumentsInType.ts
3 es2panda/test/TypeScript/tests/cases/compiler/collisionArgumentsInterfaceMembers.ts
4 es2panda/test/TypeScript/tests/cases/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.ts
5 es2panda/test/TypeScript/tests/cases/compiler/emitBundleWithShebang1.ts
6 es2panda/test/TypeScript/tests/cases/compiler/isLiteral1.ts
7 es2panda/test/TypeScript/tests/cases/compiler/isLiteral2.ts
8 es2panda/test/TypeScript/tests/cases/compiler/letAsIdentifier2.ts
9 es2panda/test/TypeScript/tests/cases/compiler/letInVarDeclOfForIn_ES5.ts
10 es2panda/test/TypeScript/tests/cases/compiler/letInVarDeclOfForIn_ES6.ts
[all …]
/arkcompiler/runtime_core/static_core/cmake/third_party/typescript/
DCMakeLists.txt30 ${TYPESCRIPT_ROOT}/lib/lib.d.ts
31 ${TYPESCRIPT_ROOT}/lib/lib.dom.d.ts
32 ${TYPESCRIPT_ROOT}/lib/lib.dom.iterable.d.ts
33 ${TYPESCRIPT_ROOT}/lib/lib.es2015.collection.d.ts
34 ${TYPESCRIPT_ROOT}/lib/lib.es2015.core.d.ts
35 ${TYPESCRIPT_ROOT}/lib/lib.es2015.d.ts
36 ${TYPESCRIPT_ROOT}/lib/lib.es2015.generator.d.ts
37 ${TYPESCRIPT_ROOT}/lib/lib.es2015.iterable.d.ts
38 ${TYPESCRIPT_ROOT}/lib/lib.es2015.promise.d.ts
39 ${TYPESCRIPT_ROOT}/lib/lib.es2015.proxy.d.ts
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/sdk/linter_1_1/
DIncrementalLinter.ts16 import * as ts from 'typescript';
19 // @ts-expect-error : should expect method
20 private readonly changedFiles: ts.Set<ts.Path> = new ts.Set<ts.Path>();
21 // @ts-expect-error : should expect method
22 private readonly programState: ts.ReusableBuilderProgramState;
25 // @ts-expect-error : should expect method
26 | ts.ESMap<ts.Path, readonly ts.ReusableDiagnostic[] | readonly ts.Diagnostic[]>;
28 …constructor(builderProgram: ts.BuilderProgram, arkTSVersion?: string, compilerOptions?: ts.Compile…
29 // @ts-expect-error : should expect method
40 isFileChanged(srcFile: ts.SourceFile): boolean {
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/utils/functions/
DidentiferUseInValueContext.ts16 import * as ts from 'typescript';
18 function isInstanceofContext(tsIdentStart: ts.Node): boolean {
20 ts.isBinaryExpression(tsIdentStart.parent) &&
21 tsIdentStart.parent.operatorToken.kind === ts.SyntaxKind.InstanceOfKeyword
25 function isNewExpressionContext(tsIdentStart: ts.Node): boolean {
26 return ts.isNewExpression(tsIdentStart.parent) && tsIdentStart === tsIdentStart.parent.expression;
33 function isQualifiedNameContext(tsIdentStart: ts.Node, tsIdentifier: ts.Identifier): boolean {
35 return ts.isQualifiedName(tsIdentStart) && tsIdentifier !== tsIdentStart.right;
38 function isPropertyAccessContext(tsIdentStart: ts.Node, tsIdentifier: ts.Identifier): boolean {
40 return ts.isPropertyAccessExpression(tsIdentStart) && tsIdentifier !== tsIdentStart.name;
[all …]
DGetScriptKind.ts16 import * as ts from 'typescript';
19 export function getScriptKind(srcFile: ts.SourceFile): ts.ScriptKind {
23 case ts.Extension.Js:
24 return ts.ScriptKind.JS;
25 case ts.Extension.Jsx:
26 return ts.ScriptKind.JSX;
27 case ts.Extension.Ts:
28 return ts.ScriptKind.TS;
29 case ts.Extension.Tsx:
30 return ts.ScriptKind.TSX;
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/autofixes/
DSymbolCache.ts16 import * as ts from 'typescript';
24 private readonly typeChecker: ts.TypeChecker,
26 readonly sourceFile: ts.SourceFile,
27 readonly cancellationToken?: ts.CancellationToken
29 const callback = (node: ts.Node): void => {
41 const stopCondition = (node: ts.Node): boolean => {
48 getReferences(symbol: ts.Symbol): ts.Node[] {
52 private handleElementAccessExpression(node: ts.Node): ts.Symbol | undefined {
53 const elementAccessExpr = node as ts.ElementAccessExpression;
57 private handleEnumDeclaration(node: ts.Node): ts.Symbol | undefined {
[all …]
DAutofixer.ts16 import * as ts from 'typescript';
45 private readonly typeChecker: ts.TypeChecker,
47 readonly sourceFile: ts.SourceFile,
48 readonly cancellationToken?: ts.CancellationToken
65 declarationFlags: ts.NodeFlags,
66 printer: ts.Printer,
67 sourceFile: ts.SourceFile
73 const propertyAccessExpr = ts.factory.createPropertyAccessExpression(
74 ts.factory.createIdentifier(newObjectName),
75 ts.factory.createIdentifier(variableName)
[all …]
/arkcompiler/ets_frontend/ets2panda/lexer/scripts/
Dkeywords.yaml17 - name: 'ts'
28 keyword_like: [ts]
32 keyword_like: [ts]
40 keyword_like: [js, ts]
45 custom_handler: [js, ts, as]
53 keyword_like: [ts]
58 keyword_like: [js, ts]
63 custom_handler: [js, ts]
67 keyword_like: [ets, ts]
71 keyword_like: [ets, js, ts]
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/utils/
DTsUtils.ts17 import * as ts from 'typescript';
50 export type CheckType = (this: TsUtils, t: ts.Type) => boolean;
53 private readonly tsTypeChecker: ts.TypeChecker,
57 entityNameToString(name: ts.EntityName): string {
58 if (ts.isIdentifier(name)) {
64 isNumberLikeType(tsType: ts.Type): boolean {
67 if ((tsCompType.flags & ts.TypeFlags.NumberLike) === 0) {
73 return (tsType.getFlags() & ts.TypeFlags.NumberLike) !== 0;
76 static isBooleanLikeType(tsType: ts.Type): boolean {
77 return (tsType.getFlags() & ts.TypeFlags.BooleanLike) !== 0;
[all …]
/arkcompiler/ets_frontend/arkguard/
DBUILD.gn22 "src/ArkObfuscator.ts",
23 "src/ArkObfuscatorForTest.ts",
24 "src/IObfuscator.ts",
25 "src/cli/SecHarmony.ts",
26 "src/common/ApiExtractor.ts",
27 "src/common/ApiReader.ts",
28 "src/common/type.ts",
29 "src/configs/INameObfuscationOption.ts",
30 "src/configs/IOptions.ts",
32 "src/generator/INameGenerator.ts",
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tools/declgen_ts2sts/src/
DASTAutofixer.ts16 import * as ts from 'typescript';
22 private readonly typeChecker: ts.TypeChecker;
23 private readonly context: ts.TransformationContext;
25 constructor(typeChecker: ts.TypeChecker, context: ts.TransformationContext) {
30 private readonly autofixes = new Map<ts.SyntaxKind, ts.Visitor[]>([
31 [ts.SyntaxKind.VariableDeclarationList, [this[FaultID.VarDeclaration].bind(this)]],
32 [ts.SyntaxKind.PropertyDeclaration, [this[FaultID.PrivateIdentifier].bind(this)]],
33 [ts.SyntaxKind.SourceFile, [this[FaultID.ImportAfterStatement].bind(this)]]
36 fixNode(node: ts.Node): ts.VisitResult<ts.Node> {
43 let result: ts.VisitResult<ts.Node> = node;
[all …]
DASTTransformer.ts16 import * as ts from 'typescript';
21 private readonly context: ts.TransformationContext;
22 private readonly sourceFileMap: Map<string, ts.SourceFile>;
23 private readonly transformers: ts.Visitor[];
26 context: ts.TransformationContext,
27 customSourceFileMap: Map<string, ts.SourceFile>,
28 transformerCallbacks: ts.Visitor[]
35 createCustomTransformer(): ts.CustomTransformer {
36 const visitor = <T extends ts.Node>(sourceFile: T): T => {
37 return ts.visitNode(sourceFile, this.visitNode.bind(this));
[all …]
/arkcompiler/ets_frontend/es2panda/test/compiler/filesInfoTest/sourceLang/mod/
DfilesInfo.txt1 ts.ts;ts;esm;mod/ts.ts;ts;false;ts
2 ets.ts;ets;esm;mod/ets.ts;ets;false;ets
4 default.ts;default;esm;mod/default.ts;default;false;
/arkcompiler/ets_frontend/es2panda/test/compiler/filesInfoTest/sourceLang/base/
DfilesInfo.txt1 ts.ts;ts;esm;base/ts.ts;ts;false;ts
2 ets.ts;ets;esm;base/ets.ts;ets;false;ets
4 default.ts;default;esm;base/default.ts;default;false;
/arkcompiler/runtime_core/static_core/scripts/sdk/
Dtest2_file_list_expected.txt108 build-sdk/sdk/tslinter/dist/lib.dom.d.ts
109 build-sdk/sdk/tslinter/dist/lib.dom.iterable.d.ts
110 build-sdk/sdk/tslinter/dist/lib.d.ts
111 build-sdk/sdk/tslinter/dist/lib.es5.d.ts
112 build-sdk/sdk/tslinter/dist/lib.es6.d.ts
113 build-sdk/sdk/tslinter/dist/lib.es2015.collection.d.ts
114 build-sdk/sdk/tslinter/dist/lib.es2015.core.d.ts
115 build-sdk/sdk/tslinter/dist/lib.es2015.d.ts
116 build-sdk/sdk/tslinter/dist/lib.es2015.generator.d.ts
117 build-sdk/sdk/tslinter/dist/lib.es2015.iterable.d.ts
[all …]

12345678910>>...71