• Home
  • Raw
  • Download

Lines Matching full:ts

34 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]);
75 …const classNode = ts.factory.createClassDeclaration(undefined, "Class", undefined, [heritageClause…
82 const name = ts.factory.createIdentifier('MyType');
83 …const typeAliasNode = ts.factory.createTypeAliasDeclaration(undefined, name, undefined, undefined);
90 const name = ts.factory.createIdentifier('MyType');
91 const type = ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword);
92 const identifierName = ts.factory.createIdentifier('Identifier');
93 const stringName = ts.factory.createStringLiteral('String');
94 …const computedPropertyName = ts.factory.createComputedPropertyName(ts.factory.createStringLiteral(…
95 const types = ts.factory.createTypeLiteralNode([
96 ts.factory.createPropertySignature(undefined, undefined, undefined, type),
97 ts.factory.createPropertySignature(undefined, identifierName, undefined, type),
98 ts.factory.createPropertySignature(undefined, stringName, undefined, type),
99 ts.factory.createPropertySignature(undefined, computedPropertyName, undefined, type),
101 … const typeAliasNode = ts.factory.createTypeAliasDeclaration(undefined, name, undefined, types);
117 const key = ts.factory.createStringLiteral('key');
118 const value = ts.factory.createStringLiteral('value');
119 const elementAccessExpression = ts.factory.createElementAccessExpression(key, value);
126 const key = ts.factory.createIdentifier('key');
127 const value = ts.factory.createBigIntLiteral("9999999");
128 const elementAccessExpression = ts.factory.createElementAccessExpression(key, value);
140 projectWhiteListManager?.setCurrentCollector('demo.ts');
154 const indexedAccessType = ts.factory.createIndexedAccessTypeNode(
155 ts.factory.createTypeReferenceNode(
156 ts.factory.createIdentifier("T"),
159 ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral("U"))
167 const indexedAccessType = ts.factory.createIndexedAccessTypeNode(
168 ts.factory.createTypeReferenceNode(
169 ts.factory.createIdentifier("T1"),
172 ts.factory.createUnionTypeNode([
173 ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral("U")),
174 ts.factory.createLiteralTypeNode(ts.factory.createNumericLiteral(1))
185 const indexedAccessType = ts.factory.createIndexedAccessTypeNode(
186 ts.factory.createTypeReferenceNode(
187 ts.factory.createIdentifier("T"),
190 ts.factory.createLiteralTypeNode(ts.factory.createNumericLiteral(1))
207 ts.factory.createPropertySignature([], undefined, undefined, undefined),
208ts.factory.createPropertySignature([], ts.factory.createStringLiteral('property'), undefined, unde…
210 …const interfaceNode = ts.factory.createInterfaceDeclaration(undefined, 'Interface', undefined, und…
226 const classProperty = ts.factory.createClassExpression(
235 ts.factory.createParameterDeclaration(
236 [ts.factory.createModifier(ts.SyntaxKind.AbstractKeyword)],
240 ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword),
243 ts.factory.createParameterDeclaration(
244 [ts.factory.createModifier(ts.SyntaxKind.PublicKeyword)],
248 ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword),
252 const expression = ts.factory.createBinaryExpression(
253 ts.factory.createIdentifier('left'),
254 ts.SyntaxKind.EqualsToken,
255 ts.factory.createIdentifier('right')
257 const statements = [ts.factory.createExpressionStatement(expression)];
260 ts.factory.createPropertyDeclaration(undefined, 'name', undefined, undefined, undefined), constant
261 ts.factory.createConstructorDeclaration(
265 ts.factory.createBlock(statements, true)
268 …const structDeclaration = ts.factory.createStructDeclaration(undefined, undefined, undefined, unde…
286 ts.factory.createEnumMember('enumMember', ts.factory.createIdentifier('enumMember')), constant
288 const enumNode = ts.factory.createEnumDeclaration(undefined, undefined, 'enum', members);
304 ts.factory.createPropertyAssignment('objKey', ts.factory.createStringLiteral('objValue'))
306 const obj = ts.factory.createObjectLiteralExpression(objProperties);
309 ts.factory.createPropertyAssignment('key', obj), constant
310 ts.factory.createShorthandPropertyAssignment('key2', obj)
312 const objNode = ts.factory.createObjectLiteralExpression(properties, true);
330 …const sourceFile: ts.SourceFile = ts.createSourceFile('demo.ts', fileContent, ts.ScriptTarget.ES20…
333 projectWhiteListManager?.setCurrentCollector('demo.ts');
334 getViewPUClassProperties(sourceFile.statements[0] as ts.ClassDeclaration);