Skip to content

Commit

Permalink
Formatted types/g* packages with dprint (DefinitelyTyped#66528)
Browse files Browse the repository at this point in the history
* Formatted types/g* packages with dprint

* Fixed introduced issues

* Fix introduced issues

* feat: revert

* fix: gestalt

* fix

* docs: comment on broken type definitions

* fix: remove broken type definitions

* feat: undo types

* Revert "fix: remove broken type definitions"

This reverts commit 624f58c.

---------

Co-authored-by: John <john.reilly@investec.co.uk>
Co-authored-by: johnnyreilly <johnny_reilly@hotmail.com>
  • Loading branch information
3 people authored Sep 20, 2023
1 parent b950930 commit ac2647c
Show file tree
Hide file tree
Showing 918 changed files with 64,281 additions and 60,601 deletions.
4 changes: 4 additions & 0 deletions types/bookshelf/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.6

// This is a *broken* type definition due to external failures
// It is excluded from nightly runs here:
// https://github.com/microsoft/DefinitelyTyped-tools/blob/master/packages/dtslint-runner/expectedFailures.txt

import Knex = require("knex");
import knex = require("knex");
import BlueBird = require("bluebird");
Expand Down
6 changes: 2 additions & 4 deletions types/gae.channel.api/gae.channel.api-tests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


function test_channel() {
var channel = new goog.appengine.Channel("test");
var socket = channel.open();
Expand All @@ -10,8 +8,8 @@ function test_channel() {
socket.onmessage = (message) => {
console.log("onmessage", message.data);
};
socket.onclose = ()=> {
socket.onclose = () => {
console.log("onclose");
}
};
socket.close();
}
14 changes: 7 additions & 7 deletions types/gae.channel.api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare namespace goog.appengine {
* Create a channel object using the token returned by the createChannel() call on the server.
* @param token {string}
*/
constructor(token:string);
constructor(token: string);

/**
* Open a socket on this channel. open() returns a goog.appengine.Socket object.
Expand All @@ -22,20 +22,20 @@ declare namespace goog.appengine {
* @param {Function} [handler]
* @return {Socket}
*/
open(handler?:Function):Socket;
open(handler?: Function): Socket;
}

export class Socket {
/**
* Close the socket.
* The socket cannot be used again after calling close; the server must create a new socket.
*/
close():void;
close(): void;

/**
* Set this to a function called when the socket is ready to receive messages.
*/
onopen:()=>void;
onopen: () => void;

/**
* Set this to a function called when the socket receives a message.
Expand All @@ -44,20 +44,20 @@ declare namespace goog.appengine {
* @param message
* @param message.data
*/
onmessage:(message:any)=>void;
onmessage: (message: any) => void;

/**
* Set this property to a function called when an error occurs on the socket.
* The function is passed one parameter: an error object.
* The description field is a description of the error and the code field is an HTTP error code indicating the error.
*/
onerror:Function;
onerror: Function;

/**
* Set this property to a function that called when the socket is closed.
* When the socket is closed, it cannot be reopened.
* Use the open() method on a goog.appengine.Channel object to create a new socket.
*/
onclose:()=>void;
onclose: () => void;
}
}
14 changes: 7 additions & 7 deletions types/gamedig/gamedig-tests.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Gamedig = require('gamedig');
import GameResolver = require('gamedig/lib/GameResolver');
import Gamedig = require("gamedig");
import GameResolver = require("gamedig/lib/GameResolver");

// direct usage from import
Gamedig.query(
{
type: 'tf2',
host: '127.0.0.1',
type: "tf2",
host: "127.0.0.1",
port: 27015,
maxAttempts: 1,
socketTimeout: 2000,
Expand All @@ -26,8 +26,8 @@ Gamedig.query(
const gamedig = new Gamedig();
gamedig.query(
{
type: 'tf2',
host: '127.0.0.1',
type: "tf2",
host: "127.0.0.1",
port: 27015,
maxAttempts: 1,
socketTimeout: 2000,
Expand Down Expand Up @@ -77,5 +77,5 @@ const games: [
};
},
] = gameResolver.games;
gameResolver.lookup('tf2');
gameResolver.lookup("tf2");
gameResolver.printReadme();
Loading

0 comments on commit ac2647c

Please sign in to comment.