mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 07:21:30 +00:00
Give some love to the linter
This commit is contained in:
@ -119,7 +119,7 @@ export abstract class Node {
|
||||
|
||||
static createOmittedType(
|
||||
range: Range
|
||||
) {
|
||||
): TypeNode {
|
||||
return Node.createType(
|
||||
Node.createIdentifierExpression("", range),
|
||||
null,
|
||||
|
@ -1892,7 +1892,11 @@ export class Compiler extends DiagnosticEmitter {
|
||||
return expr;
|
||||
}
|
||||
|
||||
compileExpressionRetainType(expression: Expression, contextualType: Type, wrapSmallIntegers: bool = true) {
|
||||
compileExpressionRetainType(
|
||||
expression: Expression,
|
||||
contextualType: Type,
|
||||
wrapSmallIntegers: bool = true
|
||||
): ExpressionRef {
|
||||
return this.compileExpression(
|
||||
expression,
|
||||
contextualType == Type.void
|
||||
|
@ -27,7 +27,7 @@ export class Decompiler {
|
||||
constructor() { }
|
||||
|
||||
/** Decompiles a module to an AST that can then be serialized. */
|
||||
decompile(module: Module) {
|
||||
decompile(module: Module): void {
|
||||
throw new Error("not implemented");
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ export abstract class DiagnosticEmitter {
|
||||
arg0: string | null = null,
|
||||
arg1: string | null = null,
|
||||
arg2: string | null = null
|
||||
) {
|
||||
): void {
|
||||
var message = DiagnosticMessage.create(code, category, arg0, arg1, arg2).withRange(range);
|
||||
this.diagnostics.push(message);
|
||||
// console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary
|
||||
|
@ -223,7 +223,7 @@ export class MemorySegment {
|
||||
buffer: Uint8Array;
|
||||
offset: I64;
|
||||
|
||||
static create(buffer: Uint8Array, offset: I64) {
|
||||
static create(buffer: Uint8Array, offset: I64): MemorySegment {
|
||||
var segment = new MemorySegment();
|
||||
segment.buffer = buffer;
|
||||
segment.offset = offset;
|
||||
|
@ -612,7 +612,7 @@ export class Program extends DiagnosticEmitter {
|
||||
decorators: DecoratorNode[] | null,
|
||||
prototype: FunctionPrototype,
|
||||
classPrototype: ClassPrototype
|
||||
) {
|
||||
): void {
|
||||
// handle operator annotations. operators are either instance methods taking
|
||||
// a second argument of the instance's type or static methods taking two
|
||||
// arguments of the instance's type. return values vary depending on the
|
||||
|
Reference in New Issue
Block a user