Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions types/blessed/blessed-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,50 @@ const list = blessed.list({

list.setItems(["string1", "string2", "string3"]);

// https://github.com/chjj/blessed/blob/master/test/widget-log.js
// modified for testing purposes

screen = blessed.screen({
dump: __dirname + "/logs/logger.log",
smartCSR: true,
autoPadding: false,
warnings: true,
});

var logger = blessed.log({
parent: screen,
top: "center",
left: "center",
width: "50%",
height: "50%",
border: "line",
tags: true,
keys: true,
vi: true,
mouse: true,
scrollback: 100,
scrollbar: {
ch: " ",
track: {
bg: "yellow",
},
style: {
inverse: true,
},
},
});

logger.align = "right";
logger.valign = "bottom";

logger.focus();

screen.key("q", function() {
return screen.destroy();
});

screen.render();

// https://github.com/chjj/blessed/blob/master/test/program-mouse.js

const program = blessed.program({
Expand Down
6 changes: 6 additions & 0 deletions types/blessed/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,12 @@ export namespace Widgets {
*/
scrollOnInput: boolean;

/**
* Content/Text alignment
*/
align: "left" | "center" | "right";
valign: "top" | "middle" | "bottom";

/**
* add a log line.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://bun.com"
],
"dependencies": {
"bun-types": "1.3.2"
"bun-types": "1.3.3"
},
"devDependencies": {
"@types/bun": "workspace:."
Expand Down
5 changes: 5 additions & 0 deletions types/karma-html2js-preprocessor/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
40 changes: 40 additions & 0 deletions types/karma-html2js-preprocessor/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import "karma";

declare module "karma" {
interface ConfigOptions {
/**
* see {@link https://github.com/karma-runner/karma-html2js-preprocessor#configuration}
*/
html2JsPreprocessor?: HTML2JSPreprocessorOptions | undefined;
}

interface HTML2JSPreprocessorOptions {
/**
* Strip this from the file path
*
* @default ''
*/
stripPrefix?: string | undefined;

/**
* Prepend this to the file path
*
* @default ''
*/
prependPrefix?: string | undefined;

/**
* Define a custom transform function
*/
processPath?: (filePath: string) => string;
}
}

declare global {
interface Window {
/**
* Collection of HTML files converted into JS strings by karma-html2js-preprocessor.
*/
__html__: Record<string, string>;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import karma = require("karma");

// Mocha reporter options tests
const mochaReporter: karma.HTML2JSPreprocessorOptions = {
stripPrefix: "strip",
prependPrefix: "prepend",
processPath: (filePath) => filePath,
};

module.exports = (config: karma.Config) => {
config.set({
preprocessors: {
"**/*.json": ["json"],
},
files: ["**/*.js", "**/*.json"],
html2JsPreprocessor: {
stripPrefix: "strip",
prependPrefix: "$json",
processPath: (filePath) => filePath,
},
});
};

window.__html__["fixture"];
20 changes: 20 additions & 0 deletions types/karma-html2js-preprocessor/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"private": true,
"name": "@types/karma-html2js-preprocessor",
"version": "1.1.9999",
"projects": [
"https://github.com/karma-runner/karma-html2js-preprocessor#readme"
],
"dependencies": {
"@types/karma": "*"
},
"devDependencies": {
"@types/karma-html2js-preprocessor": "workspace:."
},
"owners": [
{
"name": "Ivan Nikolić",
"githubUsername": "niksy"
}
]
}
20 changes: 20 additions & 0 deletions types/karma-html2js-preprocessor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "node16",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"karma-html2js-preprocessor-tests.ts"
]
}
7 changes: 1 addition & 6 deletions types/leo-profanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
"devDependencies": {
"@types/leo-profanity": "workspace:."
},
"owners": [
{
"name": "Jack Humphries",
"githubUsername": "jackhumphries9"
}
]
"owners": []
}
4 changes: 0 additions & 4 deletions types/micro-cors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"@types/micro-cors": "workspace:."
},
"owners": [
{
"name": "Callum Denby",
"githubUsername": "CallumDenby"
},
{
"name": "ChanYong Moon",
"githubUsername": "moonchanyong"
Expand Down
7 changes: 1 addition & 6 deletions types/systemjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
"devDependencies": {
"@types/systemjs": "workspace:."
},
"owners": [
{
"name": "Jolyn Denning",
"githubUsername": "jolyndenning"
}
]
"owners": []
}