@@ -240,47 +240,6 @@ namespace ts {
240
240
isIdentifier ( expression ) ;
241
241
}
242
242
243
- /**
244
- * A simple inlinable expression is an expression which can be copied into multiple locations
245
- * without risk of repeating any sideeffects and whose value could not possibly change between
246
- * any such locations
247
- */
248
- export function isSimpleInlineableExpression ( expression : Expression ) {
249
- return ! isIdentifier ( expression ) && isSimpleCopiableExpression ( expression ) ||
250
- isWellKnownSymbolSyntactically ( expression ) ;
251
- }
252
-
253
- /**
254
- * Adds super call and preceding prologue directives into the list of statements.
255
- *
256
- * @param ctor The constructor node.
257
- * @param result The list of statements.
258
- * @param visitor The visitor to apply to each node added to the result array.
259
- * @returns index of the statement that follows super call
260
- */
261
- export function addPrologueDirectivesAndInitialSuperCall ( ctor : ConstructorDeclaration , result : Statement [ ] , visitor : Visitor ) : number {
262
- if ( ctor . body ) {
263
- const statements = ctor . body . statements ;
264
- // add prologue directives to the list (if any)
265
- const index = addPrologue ( result , statements , /*ensureUseStrict*/ false , visitor ) ;
266
- if ( index === statements . length ) {
267
- // list contains nothing but prologue directives (or empty) - exit
268
- return index ;
269
- }
270
-
271
- const statement = statements [ index ] ;
272
- if ( statement . kind === SyntaxKind . ExpressionStatement && isSuperCall ( ( < ExpressionStatement > statement ) . expression ) ) {
273
- result . push ( visitNode ( statement , visitor , isStatement ) ) ;
274
- return index + 1 ;
275
- }
276
-
277
- return index ;
278
- }
279
-
280
- return 0 ;
281
- }
282
-
283
-
284
243
/**
285
244
* @param input Template string input strings
286
245
* @param args Names which need to be made file-level unique
@@ -296,43 +255,4 @@ namespace ts {
296
255
return result ;
297
256
} ;
298
257
}
299
-
300
- /**
301
- * Gets all property declarations with initializers on either the static or instance side of a class.
302
- *
303
- * @param node The class node.
304
- * @param isStatic A value indicating whether to get properties from the static or instance side of the class.
305
- */
306
- export function getInitializedProperties ( node : ClassExpression | ClassDeclaration , isStatic : boolean ) : ReadonlyArray < PropertyDeclaration > {
307
- return filter ( node . members , isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty ) ;
308
- }
309
-
310
- /**
311
- * Gets a value indicating whether a class element is a static property declaration with an initializer.
312
- *
313
- * @param member The class element node.
314
- */
315
- export function isStaticInitializedProperty ( member : ClassElement ) : member is PropertyDeclaration & { initializer : Expression ; } {
316
- return isInitializedProperty ( member ) && hasStaticModifier ( member ) ;
317
- }
318
-
319
- /**
320
- * Gets a value indicating whether a class element is an instance property declaration with an initializer.
321
- *
322
- * @param member The class element node.
323
- */
324
- export function isInstanceInitializedProperty ( member : ClassElement ) : member is PropertyDeclaration & { initializer : Expression ; } {
325
- return isInitializedProperty ( member ) && ! hasStaticModifier ( member ) ;
326
- }
327
-
328
- /**
329
- * Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer.
330
- *
331
- * @param member The class element node.
332
- * @param isStatic A value indicating whether the member should be a static or instance member.
333
- */
334
- export function isInitializedProperty ( member : ClassElement ) : member is PropertyDeclaration & { initializer : Expression ; } {
335
- return member . kind === SyntaxKind . PropertyDeclaration
336
- && ( < PropertyDeclaration > member ) . initializer !== undefined ;
337
- }
338
258
}
0 commit comments