This commit is contained in:
Yuan 2023-12-15 17:11:03 +08:00
parent b5ca647503
commit e9be1725f0
4 changed files with 19 additions and 13 deletions

18
global.d.ts vendored
View File

@ -1,14 +1,14 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
declare namespace GlobalMixins {
type JlCanvasType = import('./src/app').IJlCanvas;
type CanvasProperties = import('./src/app').ICanvasProperties;
type GraphicApp = import('./src/app').IGraphicApp;
type JlGraphicType = import('./src/core').JlGraphic;
type GraphicData = import('./src/core').GraphicData;
type GraphicState = import('./src/core').GraphicState;
type GraphicTransform = import('./src/core').GraphicTransform;
type GraphicTransformEvent = import('./src/plugins').GraphicTransformEvent;
type BoundsGraphic = import('./src/plugins').BoundsGraphic;
type JlCanvasType = import('@jl-graphic').IJlCanvas;
type CanvasProperties = import('@jl-graphic').ICanvasProperties;
type GraphicApp = import('@jl-graphic').IGraphicApp;
type JlGraphicType = import('@jl-graphic').JlGraphic;
type GraphicData = import('@jl-graphic').GraphicData;
type GraphicState = import('@jl-graphic').GraphicState;
type GraphicTransform = import('@jl-graphic').GraphicTransform;
type GraphicTransformEvent = import('@jl-graphic').GraphicTransformEvent;
type BoundsGraphic = import('@jl-graphic').BoundsGraphic;
type IPointDataType = import('pixi.js').IPointData;
type PointType = import('pixi.js').Point;
type FederatedMouseEvent = import('pixi.js').FederatedMouseEvent;

2
lib/index.d.ts vendored
View File

@ -1,4 +1,4 @@
/// <reference types="../global.ts" />
/// <reference types="global" />
export * as GraphicsExtras from '@pixi/graphics-extras';
export * from './app';
export * from './core';

View File

@ -1,4 +1,5 @@
import typescript from '@rollup/plugin-typescript';
import ts from 'typescript';
/**
* @type {import('rollup').RollupOptions}
@ -20,7 +21,7 @@ const config = {
logLevel: 'debug',
plugins: [
typescript({
declaration: true,
// declaration: true,
declarationDir: 'lib',
include: ['src/**/*'],
tsconfig: './tsconfig.json',

View File

@ -5,13 +5,18 @@
"allowJs": false,
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Bundler",
"moduleResolution": "node",
"typeRoots": ["node_modules/@types"],
"strict": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"lib": ["esnext", "dom"],
"useDefineForClassFields": true
"useDefineForClassFields": true,
"declaration": true,
"allowUmdGlobalAccess": true,
"paths": {
"@jl-graphic": ["src"]
}
},
"include": ["src/**/*.ts", "global.d.ts"],
"exclude": ["node_modules", "lib"]