PHP code example of mvccore / ext-tool-ts-generator

1. Go to this page and download the library: Download mvccore/ext-tool-ts-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mvccore / ext-tool-ts-generator example snippets




MvcCore\Ext\Tools\TsGenerator;

TsGenerator::CreateInstance()
	->SetType(
		new \ReflectionClass(\PhpObjects\BaseClass::class)
	)
	->SetPropsFlags(
		TsGenerator::PROPS_INHERIT_PROTECTED
	)
	->SetTargetPath(
		__DIR__ . '/Ts/Custom/ClassName.d.ts'
	)
	->SetWriteFlags(
		TsGenerator::WRITE_INTERFACE
		| TsGenerator::WRITE_DECLARE
		// | TsGenerator::WRITE_EXPORT
	)
	->SetExcludedPropsNames(['db'])
	//->SetCustomName('Custom.ClassName')
	->Parse()
	->Write();