Skip to content

Commit 3ae547f

Browse files
committed
Refactor DraggableInstance to use symbols for internal properties
- Introduced a new `symbols.ts` file to define unique symbols for various properties of the DraggableInstance. - Updated the DraggableInstance interface to replace direct property access with symbol-based access. - Modified the DraggableFactory class to accommodate the new symbol-based structure, ensuring all references to instance properties are updated accordingly. - Enhanced encapsulation and maintainability by using symbols to prevent potential naming conflicts and improve clarity of the code.
1 parent 69fff49 commit 3ae547f

File tree

4 files changed

+281
-195
lines changed

4 files changed

+281
-195
lines changed

docs/scripts/sizes.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ async function setupCoreEnvironment() {
4040
mkdirSync(coreTargetPath, { recursive: true });
4141

4242
if (existsSync(coreDistPath)) {
43-
const coreFiles = readdirSync(coreDistPath);
44-
for (const file of coreFiles) {
45-
const sourcePath = join(coreDistPath, file);
46-
const targetPath = join(coreTargetPath, file);
47-
const content = readFileSync(sourcePath, 'utf8');
48-
writeFileSync(targetPath, content);
43+
const coreEntries = readdirSync(coreDistPath, { withFileTypes: true });
44+
for (const entry of coreEntries) {
45+
if (entry.isFile()) {
46+
const sourcePath = join(coreDistPath, entry.name);
47+
const targetPath = join(coreTargetPath, entry.name);
48+
const content = readFileSync(sourcePath, 'utf8');
49+
writeFileSync(targetPath, content);
50+
}
4951
}
5052

5153
const corePackageJson = {

docs/src/sizes.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)