mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-19 12:44:58 -04:00
Moved to ts (#6593)
* Moved to ts * Fixed type check * Removed js suffixes * Migrated to ts * Fixed ts. * Fixed type check * Installed missing d ts
This commit is contained in:
parent
5ee2c4e7f8
commit
7e3ad03e2f
81 changed files with 961 additions and 830 deletions
|
@ -19,7 +19,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const AttributeMap = require('../../static/js/AttributeMap');
|
||||
import AttributeMap from '../../static/js/AttributeMap';
|
||||
import AttributePool from "../../static/js/AttributePool";
|
||||
const Changeset = require('../../static/js/Changeset');
|
||||
const { checkValidRev } = require('./checkValidRev');
|
||||
|
||||
|
@ -51,7 +52,7 @@ type LineModel = {
|
|||
[id:string]:string|number|LineModel
|
||||
}
|
||||
|
||||
exports._analyzeLine = (text:string, aline: LineModel, apool: Function) => {
|
||||
exports._analyzeLine = (text:string, aline: LineModel, apool: AttributePool) => {
|
||||
const line: LineModel = {};
|
||||
|
||||
// identify list
|
||||
|
|
|
@ -27,7 +27,7 @@ const hooks = require('../../static/js/pluginfw/hooks');
|
|||
const eejs = require('../eejs');
|
||||
const _analyzeLine = require('./ExportHelper')._analyzeLine;
|
||||
const _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
|
||||
const padutils = require('../../static/js/pad_utils').padutils;
|
||||
import padutils from "../../static/js/pad_utils";
|
||||
|
||||
const getPadHTML = async (pad: PadType, revNum: string) => {
|
||||
let atext = pad.atext;
|
||||
|
|
|
@ -18,7 +18,7 @@ import {APool} from "../types/PadType";
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const AttributePool = require('../../static/js/AttributePool');
|
||||
import AttributePool from '../../static/js/AttributePool';
|
||||
const {Pad} = require('../db/Pad');
|
||||
const Stream = require('./Stream');
|
||||
const authorManager = require('../db/AuthorManager');
|
||||
|
@ -61,7 +61,7 @@ exports.setPadRaw = async (padId: string, r: string, authorId = '') => {
|
|||
try {
|
||||
const processRecord = async (key:string, value: null|{
|
||||
padIDs: string|Record<string, unknown>,
|
||||
pool: APool
|
||||
pool: AttributePool
|
||||
}) => {
|
||||
if (!value) return;
|
||||
const keyParts = key.split(':');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import {PadAuthor, PadType} from "../types/PadType";
|
||||
import {MapArrayType} from "../types/MapType";
|
||||
|
||||
const AttributeMap = require('../../static/js/AttributeMap');
|
||||
import AttributeMap from '../../static/js/AttributeMap';
|
||||
const Changeset = require('../../static/js/Changeset');
|
||||
const attributes = require('../../static/js/attributes');
|
||||
const exportHtml = require('./ExportHtml');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue